![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Non-linear least-squares fitting [abstract base].
#include <fit_base.h>
Definition at line 185 of file fit_base.h.
Public Member Functions | |
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, func_t &fitfun)=0 |
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 fit_base< func_t, vec_t, mat_t >::print_iter | ( | size_t | nv, |
vec_t & | x, | ||
double | y, | ||
int | iter, | ||
double | value = 0.0 , |
||
double | limit = 0.0 |
||
) | [inline, virtual] |
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 204 of file fit_base.h.
virtual int fit_base< func_t, vec_t, mat_t >::fit | ( | size_t | ndat, |
vec_t & | xdat, | ||
vec_t & | ydat, | ||
vec_t & | yerr, | ||
size_t | npar, | ||
vec_t & | par, | ||
mat_t & | covar, | ||
double & | chi2, | ||
func_t & | fitfun | ||
) | [pure virtual] |
The covariance matrix for the parameters is returned in covar
and the value of is returned in
chi2
.
Implemented in gsl_fit< func_t, vec_t, mat_t, bool_vec_t >, and min_fit< func_t, vec_t, mat_t >.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).