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 one-dimensional functions providing a gradient calculation. It implements both the ROOT::Math::IBaseFunctionOneDim and ROOT::Math::IGradientOneDim interfaces. The method ROOT::Math::IFunction::Derivative calculates the derivative and ROOT::Math::Fdf calculates the derivative and the function values at the same time. The pure private virtual method DoDerivative() must be implemented by the derived classes, while FdF is by default implemented using DoDerivative, but it can be overloaded by the derived classes to improve the efficiency in the derivative calculation.
Definition at line 381 of file IFunction.h.
Public Types | |
typedef IBaseFunctionOneDim | BaseFunc |
typedef IGradientOneDim | BaseGrad |
Public Member Functions | |
virtual | ~IGradientFunctionOneDim () |
virtual IBaseFunctionOneDim * | Clone () const =0 |
double | Derivative (const double *x) const |
double | Derivative (double x) const |
void | FdF (const double *x, double &f, double *df) const |
virtual void | FdF (double x, double &f, double &df) const |
void | Gradient (const double *x, double *g) const |
double | operator() (const double *x) const |
double | operator() (double x) const |
Private Member Functions | |
virtual double | DoDerivative (double x) const =0 |
virtual double | DoEval (double x) const =0 |
implementation of the evaluation function. Must be implemented by derived classes More... | |
Definition at line 388 of file IFunction.h.
Definition at line 389 of file IFunction.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.
|
inlineinherited |
Compatibility method with multi-dimensional interface for partial derivative
Definition at line 277 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
|
inlineinherited |
Return the derivative of the function at a point x Use the private method DoDerivative
Definition at line 258 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
Referenced by FdF().
|
privatepure virtualinherited |
function to evaluate the derivative with respect each coordinate. To be implemented by the derived class
Implemented in ROOT::Math::GradFunctor1D.
Referenced by ROOT::Math::IGradientOneDim::Derivative(), and ROOT::Math::IGradientOneDim::Gradient().
|
privatepure virtualinherited |
implementation of the evaluation function. Must be implemented by derived classes
Implemented in ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >, ROOT::Math::WrappedFunction< Func >, ROOT::Math::OneDimParamFunctionAdapter< ParamFuncType >, ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >, ROOT::Math::IParametricFunctionOneDim, ROOT::Math::GradFunctor1D, and ROOT::Math::Functor1D.
Referenced by ROOT::Math::IBaseFunctionOneDim::operator()().
|
inlineinherited |
Compatibility method with multi-dimensional interface for Gradient and function evaluation
Definition at line 293 of file IFunction.h.
References ROOT::Math::IGradientOneDim::FdF().
|
inlinevirtual |
Optimized method to evaluate at the same time the function value and derivative at a point x. Often both value and derivatives are needed and it is often more efficient to compute them at the same time. Derived class should implement this method if performances play an important role and if it is faster to evaluate value and derivative at the same time
Implements ROOT::Math::IGradientOneDim.
Definition at line 405 of file IFunction.h.
References ROOT::Math::IGradientOneDim::Derivative(), and ROOT::Math::IBaseFunctionOneDim::operator()().
|
inlineinherited |
Compatibility method with multi-dimensional interface for Gradient
Definition at line 285 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
|
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 |
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 FdF().