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

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

IParamFunction interface (abstract class) describing multi-dimensional parametric functions It is a derived class from ROOT::Math::IBaseFunctionMultiDim and ROOT::Math::IBaseParam.

Provides the interface for evaluating a function passing a coordinate vector and a parameter vector.

Definition at line 107 of file IParamFunction.h.

Public Types

typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedefBackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

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 >
virtual ~IBaseFunctionMultiDimTempl ()=default
 
virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 Clone a function.
 
Derivative (const T *x, unsigned int icoord, T *previous_grad, T *previous_g2, T *previous_gstep) const
 In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload.
 
Derivative (const T *x, unsigned int icoord=0) const
 Return the partial derivative with respect to the passed coordinate.
 
virtual void FdF (const T *x, T &f, T *df) const
 Optimized method to evaluate at the same time the function value and derivative at a point x.
 
virtual void Gradient (const T *x, T *grad) const
 Evaluate all the vector of function derivatives (gradient) at a point x.
 
virtual void GradientWithPrevResult (const T *x, T *grad, T *previous_grad, T *previous_g2, T *previous_gstep) const
 In some cases, the gradient algorithm will use information from the previous step, these can be passed in with this overload.
 
virtual bool HasGradient () const
 
virtual unsigned int NDim () const =0
 Retrieve the dimension of the function.
 
operator() (const T *x) const
 Evaluate the function at a point x[].
 
virtual bool returnsInMinuit2ParameterSpace () const
 
- 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

DoEval (const T *x) const override
 Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values.
 
virtualDoEvalPar (const T *x, const double *p) const =0
 Implementation of the evaluation function using the x values and the parameters.
 

#include <Math/IParamFunction.h>

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

Member Typedef Documentation

◆ BaseFunc

Member Function Documentation

◆ DoEval()

template<class T >
T ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEval ( const T * x) const
inlineoverrideprivatevirtual

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

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

Reimplemented in ROOT::Math::WrappedMultiTF1Templ< T >, and ROOT::Math::IParametricGradFunctionMultiDimTempl< T >.

Definition at line 143 of file IParamFunction.h.

◆ DoEvalPar()

template<class T >
virtual T ROOT::Math::IParametricFunctionMultiDimTempl< 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

Implemented in ROOT::Math::MultiDimParamFunctionAdapter, ROOT::Math::WrappedParamFunction< FuncPtr >, ROOT::Math::WrappedParamFunctionGen< FuncPtr >, ROOT::Math::WrappedMultiTF1Templ< T >, and ROOT::Math::IParametricGradFunctionMultiDimTempl< T >.

◆ operator()() [1/2]

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

Definition at line 128 of file IParamFunction.h.

◆ operator()() [2/2]

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

Evaluate function at a point x and for given parameters p.

This method does not change the internal status of the function (internal parameter values). If for some reason one prefers caching the parameter values, SetParameters(p) and then operator()(x) should be called. Use the pure virtual function DoEvalPar to implement it

Definition at line 123 of file IParamFunction.h.

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