ODIN
Public Member Functions | List of all members

#include <fitting.h>

Inheritance diagram for ModelFunction:
Inheritance graph
[legend]

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 fitparget_fitpar (unsigned int i)=0
 
Array< float, 1 > get_function (const Array< float, 1 > &xvals) const
 

Detailed Description

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.

Definition at line 76 of file fitting.h.

Member Function Documentation

◆ evaluate_df()

virtual fvector ModelFunction::evaluate_df ( float  x) const
pure virtual

Returns the first derivatives at position 'x'.

Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.

◆ evaluate_f()

virtual float ModelFunction::evaluate_f ( float  x) const
pure virtual

Returns the function value at position 'x'.

Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.

◆ get_fitpar()

virtual fitpar& ModelFunction::get_fitpar ( unsigned int  i)
pure virtual

Returns reference to the i'th fitting parameter.

Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.

◆ get_function()

Array<float,1> ModelFunction::get_function ( const Array< float, 1 > &  xvals) const

Returns the function values for x-values 'xvals'.

◆ numof_fitpars()

virtual unsigned int ModelFunction::numof_fitpars ( ) const
pure virtual

Returns the number of independent fitting parameters.

Implemented in GammaVariateFunction, SinusFunction, GaussianFunction, ExponentialFunctionWithOffset, and ExponentialFunction.


The documentation for this class was generated from the following file: