问题
I am wondering if someone has already implemented the two Matlab functions gamfit and gampdf in C, C++ or objective-C. I figured I would ask before I go ahead and implement them myself.
回答1:
Hope those links to c source code may be of help:
http://www.mymathlib.com/functions
http://www.mymathlib.com/functions/probability/gamma_distribution.html
http://www.mymathlib.com/c_source/functions/probability/densities/gamma_density.c
Note: You should check for license, only reference I could find there was "Copyright © 2004 RLH. All rights reserved."
You may also check Boost libraries:
http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html
来源:https://stackoverflow.com/questions/9577541/matlab-gamfit-and-gampdf-functions-written-in-c