#include <fit_base.h>
Definition at line 273 of file fit_base.h.
Public Member Functions | |
fit_base () | |
virtual | ~fit_base () |
virtual int | print_iter (size_t nv, vec_t &x, double y, int iter, double value=0.0, double limit=0.0) |
Print out iteration information. | |
virtual int | fit (size_t ndat, vec_t &xdat, vec_t &ydat, vec_t &yerr, size_t npar, vec_t &par, mat_t &covar, double &chi2, param_t &pa, func_t &fitfun) |
Fit the data specified in (xdat,ydat) to the function fitfun with the parameters in par . | |
virtual const char * | type () |
Return string denoting type ("fit_base"). | |
Data Fields | |
int | verbose |
An integer describing the verbosity of the output. | |
size_t | n_dat |
The number of data points. | |
size_t | n_par |
The number of parameters. |
virtual int print_iter | ( | size_t | nv, | |
vec_t & | x, | |||
double | y, | |||
int | iter, | |||
double | value = 0.0 , |
|||
double | limit = 0.0 | |||
) | [inline, virtual] |
Print out iteration information.
Depending on the value of the variable verbose, this prints out the iteration information. If verbose=0, then no information is printed, while if verbose>1, then after each iteration, the present values of x and y are output to std::cout along with the iteration number. If verbose>=2 then each iteration waits for a character.
Definition at line 292 of file fit_base.h.
virtual int fit | ( | size_t | ndat, | |
vec_t & | xdat, | |||
vec_t & | ydat, | |||
vec_t & | yerr, | |||
size_t | npar, | |||
vec_t & | par, | |||
mat_t & | covar, | |||
double & | chi2, | |||
param_t & | pa, | |||
func_t & | fitfun | |||
) | [inline, virtual] |
Fit the data specified in (xdat,ydat) to the function fitfun
with the parameters in par
.
The covariance matrix for the parameters is returned in covar
and the value of is returned in
chi2
.
Reimplemented in fit_fix_pars, gsl_fit, and min_fit.
Definition at line 321 of file fit_base.h.