Logo ROOT   6.16/01
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
ROOT::Math::ParamFunction< IPFType > Class Template Reference

template<class IPFType>
class ROOT::Math::ParamFunction< IPFType >

Base template class for all Parametric Functions.

The template argument is the type of parameteric function interface is implementing like Parameteric 1D, Multi-Dim or gradient parametric.

A parameteric function is a Generic Function with parameters, so it is a function object which carries a state, the parameters. The parameters are described with a standard vector of doubles.

This class contains the default implementations for the methods defined in the IParamFunction interface for dealing with parameters Specific parameteric function classes should derive from this class if they want to profit from default implementations for the abstract methods. The derived classes need to implement only the DoEvalPar( x, p) and Clone() methods for non-gradient parameteric functions or DoParameterDerivative(x,p,ipar) for gradient par functions

Definition at line 67 of file ParamFunction.h.

Public Types

typedef IPFType::BaseFunc BaseFunc
 
typedef IPFType BaseParFunc
 

Public Member Functions

 ParamFunction (unsigned int npar=0)
 Construct a parameteric function with npar parameters. More...
 
virtual ~ParamFunction ()
 
unsigned int NPar () const
 Return the number of parameters. More...
 
virtual const double * Parameters () const
 Access the parameter values. More...
 
virtual void SetParameters (const double *p)
 Set the parameter values. More...
 

Protected Attributes

std::vector< double > fParams
 

Private Attributes

unsigned int fNpar
 Return true if the calculation of derivatives is implemented. More...
 

#include <Math/ParamFunction.h>

Inheritance diagram for ROOT::Math::ParamFunction< IPFType >:
[legend]

Member Typedef Documentation

◆ BaseFunc

template<class IPFType >
typedef IPFType::BaseFunc ROOT::Math::ParamFunction< IPFType >::BaseFunc

Definition at line 72 of file ParamFunction.h.

◆ BaseParFunc

template<class IPFType >
typedef IPFType ROOT::Math::ParamFunction< IPFType >::BaseParFunc

Definition at line 71 of file ParamFunction.h.

Constructor & Destructor Documentation

◆ ParamFunction()

template<class IPFType >
ROOT::Math::ParamFunction< IPFType >::ParamFunction ( unsigned int  npar = 0)
inline

Construct a parameteric function with npar parameters.

Parameters
nparnumber of parameters (default is zero)

Definition at line 78 of file ParamFunction.h.

◆ ~ParamFunction()

template<class IPFType >
virtual ROOT::Math::ParamFunction< IPFType >::~ParamFunction ( )
inlinevirtual

Definition at line 85 of file ParamFunction.h.

Member Function Documentation

◆ NPar()

template<class IPFType >
unsigned int ROOT::Math::ParamFunction< IPFType >::NPar ( ) const
inline

Return the number of parameters.

Definition at line 112 of file ParamFunction.h.

◆ Parameters()

template<class IPFType >
virtual const double * ROOT::Math::ParamFunction< IPFType >::Parameters ( ) const
inlinevirtual

Access the parameter values.

Definition at line 96 of file ParamFunction.h.

◆ SetParameters()

template<class IPFType >
virtual void ROOT::Math::ParamFunction< IPFType >::SetParameters ( const double *  p)
inlinevirtual

Set the parameter values.

Parameters
pvector of doubles containing the parameter values.

Definition at line 102 of file ParamFunction.h.

Member Data Documentation

◆ fNpar

template<class IPFType >
unsigned int ROOT::Math::ParamFunction< IPFType >::fNpar
private

Return true if the calculation of derivatives is implemented.

Return true if the calculation of derivatives with respect to the Parameters is implemented

Definition at line 137 of file ParamFunction.h.

◆ fParams

template<class IPFType >
std::vector<double> ROOT::Math::ParamFunction< IPFType >::fParams
protected

Definition at line 142 of file ParamFunction.h.

Libraries for ROOT::Math::ParamFunction< IPFType >:
[legend]

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