An abstract base class to help FunctionBase objects perform some operations. More...
#include <FunctionHelper.h>
Public Member Functions | |
virtual double | getTotal () const =0 |
Returns the sum of the values of the data set. | |
virtual double | maxCoord () const =0 |
Returns the largest coordinate value along the X axis in the data set. | |
virtual double | maxValue () const =0 |
Returns the largest value in the data set. | |
virtual double | meanCoord () const =0 |
Returns the mean of the coordinates along a X axis in the data set. | |
virtual double | meanValue () const =0 |
Returns the mean of the values in the data set. | |
virtual double | minCoord () const =0 |
Returns the smallest coordinate value along the X axis in the data set. | |
virtual double | minValue () const =0 |
Returns the smallest value in the data set. | |
virtual int | size () const =0 |
Returns the number of points in the data set. | |
virtual double | stdCoord () const =0 |
Returns the standard deviation of the coordinates along a X axis in the data set. | |
virtual double | valueAt (double x) const =0 |
Returns the value at a given coordinate. | |
virtual | ~FunctionHelper () |
The virtual destructor. |
Protected Member Functions | |
FunctionHelper () | |
The default constructor. |
An abstract base class to help FunctionBase objects perform some operations.
The class helps FunctionBase objects perform some operations that require access to the data set upon which the function will be used. In particular, for a function to estimate its initial parameters, it requires some summary information about the data set, such as the mean value for X or Y.
The use pattern is as follows. The client creates a function via its default constructor, maybe via the FunctionFactory. It then calls initialParameters() with a pointer to a concrete implementation of this class that has access to the data set. The FunctionBase object will then call one or more of the member functions declared by this class to estimate its initial parameters.
All the member functions declared in this class are pure virtual and there are no data member declared.
Definition at line 43 of file FunctionHelper.h.
|
inlineprotected |
The default constructor.
The default constructor is protected to force creation of derived class.
Definition at line 49 of file FunctionHelper.h.
|
inlinevirtual |
The virtual destructor.
No implementation is needed in this base Derived classes may need to release resources This declaration also keeps some compilers from issuing warnings.
Definition at line 56 of file FunctionHelper.h.
|
pure virtual |
Returns the sum of the values of the data set.
Implemented in ProjectorHelper.
Referenced by LogParabola::initialParameters(), Novosibirsk::initialParameters(), and Gaussian::initialParameters().
|
pure virtual |
Returns the largest coordinate value along the X axis in the data set.
Implemented in ProjectorHelper.
Referenced by Exponential::initialParameters(), Linear::initialParameters(), PowerLaw::initialParameters(), Quadratic2::initialParameters(), BrokenPowerLaw::initialParameters(), Quadratic::initialParameters(), LogParabola::initialParameters(), Novosibirsk::initialParameters(), and Gaussian::initialParameters().
|
pure virtual |
Returns the largest value in the data set.
Implemented in ProjectorHelper.
Referenced by Linear::initialParameters(), PowerLaw::initialParameters(), BrokenPowerLaw::initialParameters(), Chi2Dist::initialParameters(), Quadratic::initialParameters(), Erfc::initialParameters(), and Landau::initialParameters().
|
pure virtual |
Returns the mean of the coordinates along a X axis in the data set.
Implemented in ProjectorHelper.
Referenced by BrokenPowerLaw::initialParameters(), Chi2Dist::initialParameters(), Novosibirsk::initialParameters(), Gaussian::initialParameters(), LogNormal::initialParameters(), Erfc::initialParameters(), and Landau::initialParameters().
|
pure virtual |
Returns the mean of the values in the data set.
Implemented in ProjectorHelper.
Referenced by ConstantF::initialParameters().
|
pure virtual |
Returns the smallest coordinate value along the X axis in the data set.
Implemented in ProjectorHelper.
Referenced by Exponential::initialParameters(), Linear::initialParameters(), PowerLaw::initialParameters(), Quadratic2::initialParameters(), BrokenPowerLaw::initialParameters(), Quadratic::initialParameters(), LogParabola::initialParameters(), Novosibirsk::initialParameters(), and Gaussian::initialParameters().
|
pure virtual |
Returns the smallest value in the data set.
Implemented in ProjectorHelper.
Referenced by Linear::initialParameters(), PowerLaw::initialParameters(), BrokenPowerLaw::initialParameters(), Quadratic2::initialParameters(), and Quadratic::initialParameters().
|
pure virtual |
Returns the number of points in the data set.
Implemented in ProjectorHelper.
Referenced by LogParabola::initialParameters(), Novosibirsk::initialParameters(), and Gaussian::initialParameters().
|
pure virtual |
Returns the standard deviation of the coordinates along a X axis in the data set.
Implemented in ProjectorHelper.
Referenced by Gaussian::initialParameters(), Novosibirsk::initialParameters(), and Landau::initialParameters().
|
pure virtual |
Returns the value at a given coordinate.
Implemented in ProjectorHelper.
Referenced by Exponential::initialParameters(), PowerLaw::initialParameters(), and BrokenPowerLaw::initialParameters().