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 one-dimensional gradient functions providing in addition to function evaluation with respect the coordinates also the gradient with respect to the parameters, via the method ParameterGradient.
It is a derived class from ROOT::Math::IParametricFunctionOneDim.
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 308 of file IParamFunction.h.
Public Types | |
typedef IParametricFunctionOneDim::BaseFunc | BaseFunc |
typedef IGradientFunctionOneDim | BaseGradFunc |
typedef IParametricFunctionOneDim | BaseParamFunc |
Public Member Functions | |
virtual | ~IParametricGradFunctionOneDim () |
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 |
double | ParameterDerivative (const double *x, const double *p, unsigned int ipar=0) const |
double | ParameterDerivative (const double *x, unsigned int ipar=0) const |
double | ParameterDerivative (double x, const double *p, unsigned int ipar=0) const |
double | ParameterDerivative (double x, unsigned int ipar=0) const |
void | ParameterGradient (const double *x, const double *p, double *grad) const |
void | ParameterGradient (const double *x, double *grad) const |
virtual void | ParameterGradient (double x, const double *p, double *grad) const |
void | ParameterGradient (double x, double *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 double | DoEval (double x) const |
virtual double | DoEvalPar (double x, const double *p) const =0 |
virtual double | DoParameterDerivative (double x, const double *p, unsigned int ipar) const =0 |
Definition at line 317 of file IParamFunction.h.
Definition at line 316 of file IParamFunction.h.
Definition at line 315 of file IParamFunction.h.
|
inlinevirtual |
|
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.
|
inlineprivatevirtualinherited |
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 ROOT::Math::IParametricFunctionOneDim::DoEvalPar(), and ROOT::Math::IBaseParam::Parameters().
|
privatepure virtualinherited |
Implementation of the evaluation function using the x value and the parameters. Must be implemented by derived classes
Referenced by ROOT::Math::IParametricFunctionOneDim::DoEval(), and ROOT::Math::IParametricFunctionOneDim::operator()().
|
privatepure virtual |
Evaluate the gradient, to be implemented by the derived classes
Referenced by ParameterDerivative(), and ParameterGradient().
|
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(), 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().
|
inlineinherited |
multidim-like interface
Definition at line 184 of file IParamFunction.h.
References ROOT::Math::IParametricFunctionOneDim::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().
|
inlineinherited |
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 ROOT::Math::IParametricFunctionOneDim::DoEvalPar().
|
inline |
Partial derivative with respect a parameter Compatibility interface with multi-dimensional functions
Definition at line 384 of file IParamFunction.h.
References DoParameterDerivative().
|
inline |
Evaluate partial derivative using cached parameter values (multi-dim like interface)
Definition at line 393 of file IParamFunction.h.
References DoParameterDerivative(), and ROOT::Math::IBaseParam::Parameters().
|
inline |
Partial derivative with respect a parameter
Definition at line 367 of file IParamFunction.h.
References DoParameterDerivative().
|
inline |
Evaluate partial derivative using cached parameter values
Definition at line 375 of file IParamFunction.h.
References DoParameterDerivative(), and ROOT::Math::IBaseParam::Parameters().
|
inline |
Compatibility interface with multi-dimensional functions
Definition at line 350 of file IParamFunction.h.
References ParameterGradient().
|
inline |
Evaluate all derivatives using cached parameter values (multi-dim like interface)
Definition at line 358 of file IParamFunction.h.
References ParameterGradient(), and ROOT::Math::IBaseParam::Parameters().
|
inlinevirtual |
Evaluate the derivatives 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 if needed
Definition at line 332 of file IParamFunction.h.
References DoParameterDerivative(), and ROOT::Math::IBaseParam::NPar().
Referenced by ParameterGradient().
|
inline |
Evaluate all derivatives using cached parameter values
Definition at line 342 of file IParamFunction.h.
References ParameterGradient(), and ROOT::Math::IBaseParam::Parameters().
|
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(), ParameterDerivative(), ROOT::Math::IParametricGradFunctionMultiDimTempl< T >::ParameterGradient(), and 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 >.