BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Specialized IParamFunction interface (abstract class) for one-dimensional parametric functions It is a derived class from ROOT::Math::IBaseFunctionOneDim and ROOT::Math::IBaseParam
Definition at line 156 of file IParamFunction.h.
Public Types | |
typedef IBaseFunctionOneDim | BaseFunc |
Public Member Functions | |
virtual IBaseFunctionOneDim * | Clone () const =0 |
virtual unsigned int | NPar () const =0 |
double | operator() (const double *x) const |
double | operator() (const double *x, const double *p) const |
double | operator() (double x) const |
double | operator() (double 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 double | DoEval (double x) const |
virtual double | DoEvalPar (double x, const double *p) const =0 |
Definition at line 163 of file IParamFunction.h.
|
pure virtualinherited |
Clone a function. Each derived class will implement their version of the provate DoClone method
Implemented in ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >, ROOT::Math::WrappedFunction< Func >, ROOT::Math::OneDimParamFunctionAdapter< ParamFuncType >, ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >, ROOT::Math::GradFunctor1D, and ROOT::Math::Functor1D.
|
inlineprivatevirtual |
Implement the ROOT::Math::IBaseFunctionOneDim interface DoEval(x) using the cached parameter values
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 200 of file IParamFunction.h.
References DoEvalPar(), and ROOT::Math::IBaseParam::Parameters().
|
privatepure virtual |
Implementation of the evaluation function using the x value and the parameters. Must be implemented by derived classes
Referenced by DoEval(), and operator()().
|
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().
|
inlineinherited |
Evaluate the function at a point x[]. Compatible method with multi-dimensional functions
Definition at line 167 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
|
inline |
multidim-like interface
Definition at line 184 of file IParamFunction.h.
References DoEvalPar().
|
inlineinherited |
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be implemented by sub-classes
Definition at line 158 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
Referenced by ROOT::Math::IGradientFunctionOneDim::FdF().
|
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 175 of file IParamFunction.h.
References 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(), 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 >.