10 /**************************
11 * Non-linear programming *
12 **************************/
14 #define KMIN_RADIUS 0.5
16 #define KMIN_MAXCALL 50000
18 typedef double (*kmin_f
)(int, double*, void*);
19 typedef double (*kmin1_f
)(double, void*);
21 double kmin_hj(kmin_f func
, int n
, double *x
, void *data
, double r
, double eps
, int max_calls
); // Hooke-Jeeves'
22 double kmin_brent(kmin1_f func
, double a
, double b
, void *data
, double tol
, double *xmin
); // Brent's 1-dimenssion
24 /*********************
26 *********************/
28 double kf_lgamma(double z
); // log gamma function
29 double kf_erfc(double x
); // complementary error function
30 double kf_gammap(double s
, double z
); // regularized lower incomplete gamma function
31 double kf_gammaq(double s
, double z
); // regularized upper incomplete gamma function
32 double kf_betai(double a
, double b
, double x
); // regularized incomplete beta function