next up previous contents
Next: Covariance Functions Up: Maths Utilities Previous: Matrix Inversion and Decomposition   Contents

Solvers and Optimisation

extern Bool    quadratic_roots(double a, double b, double c, double *x1,
                               double *x2);

extern Bool    cubic_roots(double a, double b, double c, double d,
                           double *x1, double *x2, double *x3);

extern double  newton_raphson(double (*f) (), double (*df) (),
                              double x, double eps);

extern double  golden_section(double (*f) (), double a, double b,
                              int (*tol) (), void *fdata, void *tdata);

extern int    *dprog(int lx, int ly, int ux, int uy, double (*cost1) (),
                     double (*cost2) (   ));

extern double  simplexmin(int n, double *x, double lambda, double (*funk) (),
                          double ftol, void (*text) (   ));

extern double  simplexmin2(int n, double *x, double *lambda, double (*funk) (),
                           double ftol, void (*text) (   ));

extern void    amoeba(double **p, double *y, int ndim, double ftol, 
                      double (*funk) (), int *nfunk);

extern double  amotry(double **p, double *y, double *psum, int ndim,
                      double (*funk) (), int ihi, int *nfunk, double fac);

root 2017-09-25