ODIN
|
#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 |
Array< float, 1 > | get_function (const Array< float, 1 > &xvals) const |
Base class of all multi-dimensional function classes which are used for fitting. The function has an independent variable 'x' (the argument to evaluate_f), a dependent variable 'y' (the result of evaluate_f) and a number of function parameters. To use this class, derive from it and overload the virtual functions 'evaluate_f' (function value), 'evaluate_df' (first derivative), 'numof_fitpars', and 'get_fitpar'. Parameters which are modified during the fit should be members of type fitpar.
|
pure virtual |
Returns the first derivatives at position 'x'.
Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.
|
pure virtual |
Returns the function value at position 'x'.
Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.
|
pure virtual |
Returns reference to the i'th fitting parameter.
Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.
Array<float,1> ModelFunction::get_function | ( | const Array< float, 1 > & | xvals | ) | const |
Returns the function values for x-values 'xvals'.
|
pure virtual |
Returns the number of independent fitting parameters.
Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.