#include <fitting.h>

Public Member Functions | |
| virtual float | evaluate_f (float x) const =0 |
| virtual fvector | evaluate_df (float x) const =0 |
| virtual unsigned int | numof_fitpars () const =0 |
| virtual fitpar & | get_fitpar (unsigned int i)=0 |
| bool | fit (const Array< float, 1 > &yvals, const Array< float, 1 > &ysigma=defaultArray, const Array< float, 1 > &xvals=defaultArray, unsigned int max_iterations=500, double tolerance=1.0e-4) |
| Array< float, 1 > | get_function (const Array< float, 1 > &xvals) const |
Definition at line 64 of file fitting.h.
| virtual float ModelFunction::evaluate_f | ( | float | x | ) | const [pure virtual] |
Returns the function value at position 'x'.
Implemented in ExponentialFunction, ExponentialFunctionWithOffset, GaussianFunction, and SinusFunction.
| virtual fvector ModelFunction::evaluate_df | ( | float | x | ) | const [pure virtual] |
Returns the first derivatives at position 'x'.
Implemented in ExponentialFunction, ExponentialFunctionWithOffset, GaussianFunction, and SinusFunction.
| virtual unsigned int ModelFunction::numof_fitpars | ( | ) | const [pure virtual] |
Returns the number of independent fitting parameters.
Implemented in ExponentialFunction, ExponentialFunctionWithOffset, GaussianFunction, and SinusFunction.
| virtual fitpar& ModelFunction::get_fitpar | ( | unsigned int | i | ) | [pure virtual] |
Returns reference to the i'th fitting parameter.
Implemented in ExponentialFunction, ExponentialFunctionWithOffset, GaussianFunction, and SinusFunction.
| bool ModelFunction::fit | ( | const Array< float, 1 > & | yvals, | |
| const Array< float, 1 > & | ysigma = defaultArray, |
|||
| const Array< float, 1 > & | xvals = defaultArray, |
|||
| unsigned int | max_iterations = 500, |
|||
| double | tolerance = 1.0e-4 | |||
| ) |
Fit the function to the given dataset. The current parameters are taken as starting values. Fits the function to the y-values 'yvals', and optionally to the corresponding y-error bars 'ysigma' and x-vals 'xvals'. If no error-bars are given, they are all set to 0.1 and if no x-vals are given equidistant points with an increment of one are chosen, i.e. xvals(i)=i; A maximum of 'max_iterations' iterations and the given 'tolerance' is used for the fit. Returns true on success.
| Array<float,1> ModelFunction::get_function | ( | const Array< float, 1 > & | xvals | ) | const |
Returns the function values for x-values 'xvals'.
1.5.6