BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Math::IParametricFunctionMultiDimTempl< T > Class Template Referenceabstract

Description

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

IParamFunction interface (abstract class) describing multi-dimensional parameteric 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 104 of file IParamFunction.h.

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

Public Types

typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 
virtual unsigned int NDim () const =0
 
virtual unsigned int NPar () const =0
 
operator() (const T *x) const
 
operator() (const T *x, const double *p) const
 
virtual std::string ParameterName (unsigned int i) const
 
virtual const double * Parameters () const =0
 
virtual void SetParameters (const double *p)=0
 

Private Member Functions

virtual T DoEval (const T *x) const
 
virtual T DoEvalPar (const T *x, const double *p) const =0
 

Member Typedef Documentation

◆ BackendType

template<class T >
typedef T ROOT::Math::IBaseFunctionMultiDimTempl< T >::BackendType
inherited

Definition at line 66 of file IFunction.h.

◆ BaseFunc

Definition at line 108 of file IParamFunction.h.

Member Function Documentation

◆ Clone()

◆ DoEval()

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

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

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

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

Definition at line 140 of file IParamFunction.h.

141  {
142  return DoEvalPar(x, Parameters());
143  }
virtual const double * Parameters() const =0
virtual T DoEvalPar(const T *x, const double *p) const =0

References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEvalPar(), and ROOT::Math::IBaseParam::Parameters().

Referenced by ROOT::Math::IParametricFunctionMultiDimTempl< T >::operator()().

Here is the call graph for this function:

◆ DoEvalPar()

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

◆ NDim()

◆ NPar()

◆ operator()() [1/2]

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

Definition at line 125 of file IParamFunction.h.

126  {
127  return DoEval(x);
128  }

References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEval().

Here is the call graph for this function:

◆ 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 120 of file IParamFunction.h.

121  {
122  return DoEvalPar(x, p);
123  }

References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEvalPar().

Here is the call graph for this function:

◆ ParameterName()

virtual std::string ROOT::Math::IBaseParam::ParameterName ( unsigned int  i) const
inlinevirtualinherited

Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default name ("Par_0, Par_1, ...")

Definition at line 83 of file IParamFunction.h.

84  {
85  assert(i < NPar());
86  return "Par_" + Util::ToString(i);
87  }
virtual unsigned int NPar() const =0
std::string ToString(const T &val)
Definition: Util.h:42

References ROOT::Math::IBaseParam::NPar(), and ROOT::Math::Util::ToString().

Referenced by ROOT::Fit::FitConfig::CreateParamsSettings().

Here is the call graph for this function:

◆ Parameters()

◆ SetParameters()

virtual void ROOT::Math::IBaseParam::SetParameters ( const double *  p)
pure virtualinherited

Set the parameter values

Parameters
pvector of doubles containing the parameter values.

to be defined: can user change number of params ? At the moment no.

Implemented in ROOT::Math::WrappedParamFunctionGen< FuncPtr >, and ROOT::Math::WrappedParamFunction< FuncPtr >.


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