Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::IParametricGradFunctionMultiDimTempl< T > Class Template Referenceabstract

template<class T>
class ROOT::Math::IParametricGradFunctionMultiDimTempl< T >

Interface (abstract class) for parametric gradient multi-dimensional functions providing in addition to function evaluation with respect to the coordinates also the gradient with respect to the parameters, via the method ParameterGradient.

It is a derived class from ROOT::Math::IParametricFunctionMultiDim.

The pure private virtual method DoParameterGradient must be implemented by the derived classes in addition to those inherited by the base abstract classes.

Definition at line 224 of file IParamFunction.h.

Public Types

using BaseFunc = typename IParametricFunctionMultiDimTempl< T >::BaseFunc
 
using BaseGradFunc = IGradientFunctionMultiDimTempl< T >
 
using BaseParamFunc = IParametricFunctionMultiDimTempl< T >
 
- Public Types inherited from ROOT::Math::IParametricFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

virtual ~IParametricGradFunctionMultiDimTempl ()
 Virtual Destructor (no operations)
 
operator() (const T *x) const
 
operator() (const T *x, const double *p) const
 
ParameterDerivative (const T *x, const double *p, unsigned int ipar=0) const
 Evaluate the partial derivative w.r.t a parameter ipar from values and parameters.
 
ParameterDerivative (const T *x, unsigned int ipar=0) const
 Evaluate partial derivative using cached parameter values.
 
virtual void ParameterGradient (const T *x, const double *p, T *grad) const
 Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at a point x.
 
void ParameterGradient (const T *x, T *grad) const
 Evaluate all derivatives using cached parameter values.
 
- Public Member Functions inherited from ROOT::Math::IParametricFunctionMultiDimTempl< T >
operator() (const T *x) const
 
operator() (const T *x, const double *p) const
 Evaluate function at a point x and for given parameters p.
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor
 
virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 Clone a function.
 
virtual unsigned int NDim () const =0
 Retrieve the dimension of the function.
 
operator() (const T *x) const
 Evaluate the function at a point x[].
 
- Public Member Functions inherited from ROOT::Math::IBaseParam
virtual ~IBaseParam ()
 Virtual Destructor (no operations)
 
virtual unsigned int NPar () const =0
 Return the number of Parameters.
 
virtual std::string ParameterName (unsigned int i) const
 Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default name ("Par_0, Par_1, ...")
 
virtual const doubleParameters () const =0
 Access the parameter values.
 
virtual void SetParameters (const double *p)=0
 Set the parameter values.
 

Private Member Functions

virtual T DoEval (const T *x) const
 Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values.
 
virtual T DoEvalPar (const T *x, const double *p) const =0
 Implementation of the evaluation function using the x values and the parameters.
 
virtual T DoParameterDerivative (const T *x, const double *p, unsigned int ipar) const =0
 Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes.
 

#include <Math/IParamFunction.h>

Inheritance diagram for ROOT::Math::IParametricGradFunctionMultiDimTempl< T >:
[legend]

Member Typedef Documentation

◆ BaseFunc

template<class T >
using ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::BaseFunc = typename IParametricFunctionMultiDimTempl<T>::BaseFunc

Definition at line 229 of file IParamFunction.h.

◆ BaseGradFunc

template<class T >
using ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::BaseGradFunc = IGradientFunctionMultiDimTempl<T>

Definition at line 228 of file IParamFunction.h.

◆ BaseParamFunc

Definition at line 227 of file IParamFunction.h.

Constructor & Destructor Documentation

◆ ~IParametricGradFunctionMultiDimTempl()

Virtual Destructor (no operations)

Definition at line 235 of file IParamFunction.h.

Member Function Documentation

◆ DoEval()

template<class T >
virtual T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEval ( const T *  x) const
inlineprivatevirtual

Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values.

Reimplemented from ROOT::Math::IParametricFunctionMultiDimTempl< T >.

Reimplemented in ROOT::Math::WrappedMultiTF1Templ< T >.

Definition at line 288 of file IParamFunction.h.

◆ DoEvalPar()

template<class T >
virtual T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEvalPar ( const T *  x,
const double p 
) const
privatepure virtual

Implementation of the evaluation function using the x values and the parameters.

Must be implemented by derived classes

Implements ROOT::Math::IParametricFunctionMultiDimTempl< T >.

Implemented in ROOT::Math::WrappedMultiTF1Templ< T >.

◆ DoParameterDerivative()

template<class T >
virtual T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoParameterDerivative ( const T *  x,
const double p,
unsigned int  ipar 
) const
privatepure virtual

Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes.

Implemented in ROOT::Math::WrappedMultiTF1Templ< T >.

◆ operator()() [1/2]

template<class T >
T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::operator() ( const T *  x) const
inline

Definition at line 245 of file IParamFunction.h.

◆ operator()() [2/2]

template<class T >
T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::operator() ( const T *  x,
const double p 
) const
inline

Definition at line 240 of file IParamFunction.h.

◆ ParameterDerivative() [1/2]

template<class T >
T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterDerivative ( const T *  x,
const double p,
unsigned int  ipar = 0 
) const
inline

Evaluate the partial derivative w.r.t a parameter ipar from values and parameters.

Definition at line 264 of file IParamFunction.h.

◆ ParameterDerivative() [2/2]

template<class T >
T ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterDerivative ( const T *  x,
unsigned int  ipar = 0 
) const
inline

Evaluate partial derivative using cached parameter values.

Definition at line 276 of file IParamFunction.h.

◆ ParameterGradient() [1/2]

template<class T >
virtual void ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient ( const T *  x,
const double p,
T *  grad 
) const
inlinevirtual

Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at a point x.

It is optional to be implemented by the derived classes for better efficiency

Reimplemented in ROOT::Math::WrappedMultiTF1Templ< T >.

Definition at line 254 of file IParamFunction.h.

◆ ParameterGradient() [2/2]

template<class T >
void ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient ( const T *  x,
T *  grad 
) const
inline

Evaluate all derivatives using cached parameter values.

Definition at line 272 of file IParamFunction.h.

  • math/mathcore/inc/Math/IParamFunction.h