BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
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 | |
typedef T | BackendType |
using | BaseFunc = typename IParametricFunctionMultiDimTempl< T >::BaseFunc |
using | BaseGradFunc = IGradientFunctionMultiDimTempl< T > |
using | BaseParamFunc = IParametricFunctionMultiDimTempl< T > |
Public Member Functions | |
virtual | ~IParametricGradFunctionMultiDimTempl () |
virtual IBaseFunctionMultiDimTempl< T > * | Clone () const =0 |
virtual unsigned int | NDim () const =0 |
virtual unsigned int | NPar () const =0 |
T | operator() (const T *x) const |
T | operator() (const T *x, const double *p) const |
T | ParameterDerivative (const T *x, const double *p, unsigned int ipar=0) const |
T | ParameterDerivative (const T *x, unsigned int ipar=0) const |
virtual void | ParameterGradient (const T *x, const double *p, T *grad) const |
void | ParameterGradient (const T *x, T *grad) 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 |
virtual T | DoParameterDerivative (const T *x, const double *p, unsigned int ipar) const =0 |
|
inherited |
Definition at line 66 of file IFunction.h.
using ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::BaseFunc = typename IParametricFunctionMultiDimTempl<T>::BaseFunc |
Definition at line 229 of file IParamFunction.h.
using ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::BaseGradFunc = IGradientFunctionMultiDimTempl<T> |
Definition at line 228 of file IParamFunction.h.
using ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::BaseParamFunc = IParametricFunctionMultiDimTempl<T> |
Definition at line 227 of file IParamFunction.h.
|
inlinevirtual |
|
pure virtualinherited |
Clone a function. Each derived class must implement their version of the Clone method
Implemented in ROOT::Math::WrappedParamFunctionGen< FuncPtr >, ROOT::Math::WrappedParamFunction< FuncPtr >, ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >, ROOT::Math::WrappedMultiFunction< Func >, ROOT::Math::MultiNumGradFunction, ROOT::Math::MinimTransformFunction, ROOT::Math::LSResidualFunc, ROOT::Math::GradFunctor, ROOT::Math::Functor, and ROOT::Fit::FcnAdapter.
Referenced by ROOT::Math::MultiNumGradFunction::Clone().
|
inlineprivatevirtual |
Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values
Reimplemented from ROOT::Math::IParametricFunctionMultiDimTempl< T >.
Definition at line 288 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEvalPar(), and ROOT::Math::IBaseParam::Parameters().
Referenced by ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::operator()().
|
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 >.
Referenced by ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEval(), and ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::operator()().
|
privatepure virtual |
Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes
Referenced by ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterDerivative(), and ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient().
|
pure virtualinherited |
Retrieve the dimension of the function
Implemented in ROOT::Math::WrappedParamFunctionGen< FuncPtr >, ROOT::Math::WrappedParamFunction< FuncPtr >, ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >, ROOT::Math::WrappedMultiFunction< Func >, ROOT::Math::MultiNumGradFunction, ROOT::Math::MinimTransformFunction, ROOT::Math::LSResidualFunc, ROOT::Math::GradFunctor, ROOT::Math::Functor, and ROOT::Fit::FcnAdapter.
|
pure virtualinherited |
Return the number of Parameters
Implemented in ROOT::Math::WrappedParamFunctionGen< FuncPtr >, and ROOT::Math::WrappedParamFunction< FuncPtr >.
Referenced by ROOT::Fit::FitConfig::CreateParamsSettings(), ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient(), ROOT::Math::IParametricGradFunctionOneDim::ParameterGradient(), and ROOT::Math::IBaseParam::ParameterName().
|
inline |
Definition at line 245 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEval().
|
inline |
Definition at line 240 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEvalPar().
|
inline |
Evaluate the partial derivative w.r.t a parameter ipar from values and parameters
Definition at line 264 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoParameterDerivative().
|
inline |
Evaluate partial derivative using cached parameter values
Definition at line 276 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoParameterDerivative(), and ROOT::Math::IBaseParam::Parameters().
|
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
Definition at line 254 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoParameterDerivative(), and ROOT::Math::IBaseParam::NPar().
|
inline |
Evaluate all derivatives using cached parameter values
Definition at line 272 of file IParamFunction.h.
References ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient(), and ROOT::Math::IBaseParam::Parameters().
Referenced by ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient().
|
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.
References ROOT::Math::IBaseParam::NPar(), and ROOT::Math::Util::ToString().
Referenced by ROOT::Fit::FitConfig::CreateParamsSettings().
|
pure virtualinherited |
Access the parameter values
Implemented in ROOT::Math::WrappedParamFunctionGen< FuncPtr >, and ROOT::Math::WrappedParamFunction< FuncPtr >.
Referenced by ROOT::Fit::FitConfig::CreateParamsSettings(), ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEval(), ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::DoEval(), ROOT::Math::IParametricFunctionOneDim::DoEval(), ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterDerivative(), ROOT::Math::IParametricGradFunctionOneDim::ParameterDerivative(), ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient(), and ROOT::Math::IParametricGradFunctionOneDim::ParameterGradient().
|
pure virtualinherited |
Set the parameter values
p | vector 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 >.