BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
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.
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 |
T | operator() (const T *x) const |
T | 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 |
|
inherited |
Definition at line 66 of file IFunction.h.
typedef IBaseFunctionMultiDimTempl<T> ROOT::Math::IParametricFunctionMultiDimTempl< T >::BaseFunc |
Definition at line 108 of file IParamFunction.h.
|
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
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Reimplemented in ROOT::Math::IParametricGradFunctionMultiDimTempl< T >, and ROOT::Math::WrappedParamFunctionGen< FuncPtr >.
Definition at line 140 of file IParamFunction.h.
References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEvalPar(), and ROOT::Math::IBaseParam::Parameters().
Referenced by ROOT::Math::IParametricFunctionMultiDimTempl< T >::operator()().
|
privatepure virtual |
Implementation of the evaluation function using the x values and the parameters. Must be implemented by derived classes
Implemented in ROOT::Math::IParametricGradFunctionMultiDimTempl< T >, ROOT::Math::WrappedParamFunctionGen< FuncPtr >, and ROOT::Math::WrappedParamFunction< FuncPtr >.
Referenced by ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEval(), and ROOT::Math::IParametricFunctionMultiDimTempl< T >::operator()().
|
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 125 of file IParamFunction.h.
References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEval().
|
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.
References ROOT::Math::IParametricFunctionMultiDimTempl< T >::DoEvalPar().
|
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 >.