Definition at line 27 of file FcnAdapter.h.
Public Types | |
| typedef double | BackendType |
| typedef IBaseFunctionMultiDimTempl< double > | BaseFunc |
Public Member Functions | |
| FcnAdapter (void(*fcn)(int &, double *, double &, double *, int), int dim=0) | |
| ~FcnAdapter () override | |
| ROOT::Math::IMultiGenFunction * | Clone () const override |
| Clone a function. | |
| double | Derivative (const double *x, unsigned int icoord, double *previous_grad, double *previous_g2, double *previous_gstep) const |
| In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload. | |
| double | Derivative (const double *x, unsigned int icoord=0) const |
| Return the partial derivative with respect to the passed coordinate. | |
| virtual void | FdF (const double *x, double &f, double *df) const |
| Optimized method to evaluate at the same time the function value and derivative at a point x. | |
| virtual void | Gradient (const double *x, double *grad) const |
| Evaluate all the vector of function derivatives (gradient) at a point x. | |
| virtual bool | HasGradient () const |
| unsigned int | NDim () const override |
| Retrieve the dimension of the function. | |
| double | operator() (const double *x) const |
| Evaluate the function at a point x[]. | |
| void | SetDimension (int dim) |
Private Member Functions | |
| virtual double | DoDerivative (const double *, unsigned int) const |
| Function to evaluate the derivative with respect each coordinate. To be implemented by the derived class. | |
| virtual double | DoDerivativeWithPrevResult (const double *x, unsigned int icoord, double *, double *, double *) const |
| In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload. | |
| double | DoEval (const double *x) const override |
| Implementation of the evaluation function. Must be implemented by derived classes. | |
Private Attributes | |
| unsigned int | fDim |
| void(* | fFCN )(int &, double *, double &, double *, int) |
#include <Fit/FcnAdapter.h>
|
inherited |
Definition at line 67 of file IFunction.h.
|
inherited |
Definition at line 68 of file IFunction.h.
|
inline |
Definition at line 31 of file FcnAdapter.h.
|
inlineoverride |
Definition at line 36 of file FcnAdapter.h.
|
inlineoverridevirtual |
Clone a function.
Each derived class must implement their version of the Clone method.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< double >.
Definition at line 40 of file FcnAdapter.h.
|
inlineinherited |
In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload.
The previous_* arrays can also be used to return second derivative and step size so that these can be passed forward again as well at the call site, if necessary.
Definition at line 120 of file IFunction.h.
|
inlineinherited |
Return the partial derivative with respect to the passed coordinate.
Definition at line 115 of file IFunction.h.
|
inlineprivatevirtualinherited |
Function to evaluate the derivative with respect each coordinate. To be implemented by the derived class.
Reimplemented in ROOT::Math::GradFunctor, ROOT::Math::LSResidualFunc< Func >, ROOT::Math::MinimTransformFunction, and ROOT::Math::MultiNumGradFunction.
Definition at line 131 of file IFunction.h.
|
inlineprivatevirtualinherited |
In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload.
The previous_* arrays can also be used to return second derivative and step size so that these can be passed forward again as well at the call site, if necessary.
Definition at line 136 of file IFunction.h.
Implementation of the evaluation function. Must be implemented by derived classes.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< double >.
Definition at line 48 of file FcnAdapter.h.
|
inlinevirtualinherited |
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
Reimplemented in ROOT::Math::LSResidualFunc< Func >.
Definition at line 108 of file IFunction.h.
|
inlinevirtualinherited |
Evaluate all the vector of function derivatives (gradient) at a point x.
Derived classes must re-implement it if more efficient than evaluating one at a time
Reimplemented in ROOT::Math::GradFunctor, and ROOT::Math::LSResidualFunc< Func >.
Definition at line 96 of file IFunction.h.
|
inlinevirtualinherited |
Reimplemented in ROOT::Math::IGradientFunctionMultiDimTempl< double >.
Definition at line 92 of file IFunction.h.
|
inlineoverridevirtual |
Retrieve the dimension of the function.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< double >.
Definition at line 38 of file FcnAdapter.h.
|
inlineinherited |
Evaluate the function at a point x[].
Use the pure virtual private method DoEval which must be implemented by the sub-classes.
Definition at line 81 of file IFunction.h.
|
inline |
Definition at line 44 of file FcnAdapter.h.
|
private |
Definition at line 58 of file FcnAdapter.h.
Definition at line 59 of file FcnAdapter.h.