|
| Bsimplex () |
|
| Bsimplex (long nv, long np, long nc, long n, vector< double > &ax, vector< double > &ay) |
| Initializes a Bsimplex structure. More...
|
|
long | variables () |
|
long | constants () |
|
double | constant (long i) |
|
void | constant (long i, double p) |
|
void | constants (long n, vector< double > &p) |
|
long | points () |
|
long | parameters () |
|
void | parameters (long n, vector< double > &p) |
|
vector< double > | parameter_vector () |
|
void | parameter (long i, double p) |
|
double | parameter (long i) |
|
void | limit_low (long i, double v) |
|
double | limit_low (long i) |
|
void | limit_high (long i, double v) |
|
double | limit_high (long i) |
|
void | limits (long i, double vlo, double vhi) |
|
void | limits_low (long n, vector< double > &p) |
|
void | limits_high (long n, vector< double > &p) |
|
vector< double > & | independent_values () |
|
vector< double > & | dependent_values () |
|
double | dependent_variance () |
|
double | R (double(funk)(Bsimplex &)) |
|
double | run (long maxcycles, double tolerance, double(funk)(Bsimplex &), long report=0) |
|
double | amotry (vector< double > &mp, vector< double > &R, long ihi, double fac, double(funk)(Bsimplex &)) |
|
void | show () |
|
Structure used in the downhill simplex method.
Nelder and Mead downhill simplex method for generalized parameter fitting
Adapted from Numerical Recipes, 2nd edition, Press et al. 1992
The structure is set up to accommodate any number of variables, parameters,
constants and points.
The structure is very flexible in the sense that only some fields
are absolutely required and with a fixed meaning for the simplex method.
The required fields are:
nparam, param, lo, hi
The other fields may be recast and used as desired in the user function.
Intended sizes:
param nparam.
lo nparam.
hi nparam.
c nconstant.
x npoint*nvar.
fx npoint.