LSResidualFunc class description.
Internal class used for accessing the residuals of the Least Square function and their derivatives which are estimated numerically using GSL numerical derivation. The class contains a pointer to the fit method function and an index specifying the i-th residual and wraps it in a multi-dim gradient function interface ROOT::Math::IGradientFunctionMultiDim. The class is used by ROOT::Math::GSLNLSMinimizer (GSL non linear least square fitter)
Definition at line 135 of file GSLNLSMinimizer.cxx.
Public Member Functions | |
| LSResidualFunc () | |
| LSResidualFunc (const Func &func, unsigned int i) | |
| LSResidualFunc (const LSResidualFunc< Func > &rhs) | |
| IMultiGenFunction * | Clone () const override |
| Clone a function. | |
| void | FdF (const double *x, double &f, double *g) const override |
| Optimized method to evaluate at the same time the function value and derivative at a point x. | |
| void | Gradient (const double *x, double *g) const override |
| Evaluate all the vector of function derivatives (gradient) at a point x. | |
| unsigned int | NDim () const override |
| Retrieve the dimension of the function. | |
| LSResidualFunc< Func > & | operator= (const LSResidualFunc< Func > &rhs) |
Public Member Functions inherited from ROOT::Math::IGradientFunctionMultiDimTempl< double > | |
| 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, 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. | |
| double | Derivative (const double *x, unsigned int icoord=0) const |
| Return the partial derivative with respect to the passed coordinate. | |
| virtual void | GradientWithPrevResult (const double *x, double *grad, double *previous_grad, double *previous_g2, double *previous_gstep) const |
| In some cases, the gradient algorithm will use information from the previous step, these can be passed in with this overload. | |
| virtual void | GradientWithPrevResult (const double *x, double *grad, double *previous_grad, double *previous_g2, double *previous_gstep) const |
| In some cases, the gradient algorithm will use information from the previous step, these can be passed in with this overload. | |
| bool | HasGradient () const |
| bool | HasGradient () const |
| virtual bool | returnsInMinuit2ParameterSpace () const |
| virtual bool | returnsInMinuit2ParameterSpace () const |
Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< double > | |
| virtual | ~IBaseFunctionMultiDimTempl ()=default |
| virtual | ~IBaseFunctionMultiDimTempl ()=default |
| double | operator() (const double *x) const |
| Evaluate the function at a point x[]. | |
| double | operator() (const double *x) const |
| Evaluate the function at a point x[]. | |
Private Member Functions | |
| double | DoDerivative (const double *, unsigned int) const override |
| Function to evaluate the derivative with respect each coordinate. To be implemented by the derived class. | |
| double | DoEval (const double *x) const override |
| Implementation of the evaluation function. Must be implemented by derived classes. | |
Private Attributes | |
| const Func * | fChi2 |
| unsigned int | fIndex |
Additional Inherited Members | |
Public Types inherited from ROOT::Math::IGradientFunctionMultiDimTempl< double > | |
| typedef IBaseFunctionMultiDimTempl< double > | BaseFunc |
| typedef IGradientFunctionMultiDimTempl< double > | BaseGrad |
Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< double > | |
| typedef double | BackendType |
| typedef IBaseFunctionMultiDimTempl< double > | BaseFunc |
|
inline |
Definition at line 139 of file GSLNLSMinimizer.cxx.
|
inline |
Definition at line 143 of file GSLNLSMinimizer.cxx.
|
inline |
Definition at line 150 of file GSLNLSMinimizer.cxx.
|
inlineoverridevirtual |
Clone a function.
Each derived class must implement their version of the Clone method.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< double >.
Definition at line 165 of file GSLNLSMinimizer.cxx.
|
inlineoverrideprivatevirtual |
Function to evaluate the derivative with respect each coordinate. To be implemented by the derived class.
Implements ROOT::Math::IGradientFunctionMultiDimTempl< double >.
Definition at line 193 of file GSLNLSMinimizer.cxx.
|
inlineoverrideprivatevirtual |
Implementation of the evaluation function. Must be implemented by derived classes.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< double >.
Definition at line 189 of file GSLNLSMinimizer.cxx.
|
inlineoverridevirtual |
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 from ROOT::Math::IGradientFunctionMultiDimTempl< double >.
Definition at line 176 of file GSLNLSMinimizer.cxx.
|
inlineoverridevirtual |
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 from ROOT::Math::IGradientFunctionMultiDimTempl< double >.
Definition at line 171 of file GSLNLSMinimizer.cxx.
|
inlineoverridevirtual |
Retrieve the dimension of the function.
Reimplemented from ROOT::Math::IGradientFunctionMultiDimTempl< double >.
Definition at line 169 of file GSLNLSMinimizer.cxx.
|
inline |
Definition at line 158 of file GSLNLSMinimizer.cxx.
|
private |
Definition at line 200 of file GSLNLSMinimizer.cxx.
|
private |
Definition at line 199 of file GSLNLSMinimizer.cxx.