Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::LSResidualFunc Class Reference

LSResidualFunc class description.

Internal class used for accessing the residuals of the Least Square function and their derivates 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 63 of file GSLNLSMinimizer.h.

Public Member Functions

 LSResidualFunc ()
 
 LSResidualFunc (const LSResidualFunc &rhs)
 
 LSResidualFunc (const ROOT::Math::FitMethodFunction &func, unsigned int i)
 
IMultiGenFunctionClone () const
 Clone a function.
 
void FdF (const double *x, double &f, double *g) const
 
void Gradient (const double *x, double *g) const
 
unsigned int NDim () const
 Retrieve the dimension of the function.
 
LSResidualFuncoperator= (const LSResidualFunc &rhs)
 
- Public Member Functions inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T >
virtual ~IGradientFunctionMultiDimTempl ()
 Virtual Destructor (no operations)
 
virtual void FdF (const T *x, T &f, T *df) const
 Optimized method to evaluate at the same time the function value and derivative at a point x.
 
virtual void Gradient (const T *x, T *grad) const
 Evaluate all the vector of function derivatives (gradient) at a point x.
 
virtual void GradientWithPrevResult (const T *x, T *grad, T *previous_grad, T *previous_g2, T *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 bool returnsInMinuit2ParameterSpace () const
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor
 
operator() (const T *x) const
 Evaluate the function at a point x[].
 
- Public Member Functions inherited from ROOT::Math::IGradientMultiDimTempl< T >
virtual ~IGradientMultiDimTempl ()
 virual destructor
 
Derivative (const T *x, unsigned int icoord, T *previous_grad, T *previous_g2, T *previous_gstep) const
 In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload.
 
Derivative (const T *x, unsigned int icoord=0) const
 Return the partial derivative with respect to the passed coordinate.
 

Private Member Functions

double DoDerivative (const double *x, unsigned int icoord) const
 
double DoEval (const double *x) const
 

Private Attributes

const ROOT::Math::FitMethodFunctionfChi2
 
unsigned int fIndex
 
std::vector< doublefX2
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
typedef IGradientMultiDimTempl< T > BaseGrad
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

#include <Math/GSLNLSMinimizer.h>

Inheritance diagram for ROOT::Math::LSResidualFunc:
[legend]

Constructor & Destructor Documentation

◆ LSResidualFunc() [1/3]

ROOT::Math::LSResidualFunc::LSResidualFunc ( )
inline

Definition at line 67 of file GSLNLSMinimizer.h.

◆ LSResidualFunc() [2/3]

ROOT::Math::LSResidualFunc::LSResidualFunc ( const ROOT::Math::FitMethodFunction func,
unsigned int  i 
)
inline

Definition at line 71 of file GSLNLSMinimizer.h.

◆ LSResidualFunc() [3/3]

ROOT::Math::LSResidualFunc::LSResidualFunc ( const LSResidualFunc rhs)
inline

Definition at line 79 of file GSLNLSMinimizer.h.

Member Function Documentation

◆ Clone()

IMultiGenFunction * ROOT::Math::LSResidualFunc::Clone ( ) const
inlinevirtual

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 95 of file GSLNLSMinimizer.h.

◆ DoDerivative()

double ROOT::Math::LSResidualFunc::DoDerivative ( const double x,
unsigned int  icoord 
) const
inlineprivate

Definition at line 125 of file GSLNLSMinimizer.h.

◆ DoEval()

double ROOT::Math::LSResidualFunc::DoEval ( const double x) const
inlineprivate

Definition at line 121 of file GSLNLSMinimizer.h.

◆ FdF()

void ROOT::Math::LSResidualFunc::FdF ( const double x,
double f,
double g 
) const
inline

Definition at line 106 of file GSLNLSMinimizer.h.

◆ Gradient()

void ROOT::Math::LSResidualFunc::Gradient ( const double x,
double g 
) const
inline

Definition at line 101 of file GSLNLSMinimizer.h.

◆ NDim()

unsigned int ROOT::Math::LSResidualFunc::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Reimplemented from ROOT::Math::IGradientFunctionMultiDimTempl< T >.

Definition at line 99 of file GSLNLSMinimizer.h.

◆ operator=()

LSResidualFunc & ROOT::Math::LSResidualFunc::operator= ( const LSResidualFunc rhs)
inline

Definition at line 87 of file GSLNLSMinimizer.h.

Member Data Documentation

◆ fChi2

const ROOT::Math::FitMethodFunction* ROOT::Math::LSResidualFunc::fChi2
private

Definition at line 134 of file GSLNLSMinimizer.h.

◆ fIndex

unsigned int ROOT::Math::LSResidualFunc::fIndex
private

Definition at line 133 of file GSLNLSMinimizer.h.

◆ fX2

std::vector<double> ROOT::Math::LSResidualFunc::fX2
mutableprivate

Definition at line 135 of file GSLNLSMinimizer.h.

Libraries for ROOT::Math::LSResidualFunc:

The documentation for this class was generated from the following file: