ROOT   Reference Guide
ROOT::Math::LSResidualFunc< Func > Class Template Reference
template<class Func>
class ROOT::Math::LSResidualFunc< Func >

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)

IMultiGenFunctionClone () const override
Clone a function. More...

void FdF (const double *x, double &f, double *g) const override

void Gradient (const double *x, double *g) const override

unsigned int NDim () const override
Retrieve the dimension of the function. More...

LSResidualFunc< Func > & operator= (const LSResidualFunc< Func > &rhs)

Public Member Functions inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T >
Virtual Destructor (no operations) More...

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. More...

Evaluate all the vector of function derivatives (gradient) at a point x. More...

In some cases, the gradient algorithm will use information from the previous step, these can be passed in with this overload. More...

virtual unsigned int NDim () const=0
Retrieve the dimension of the function. More...

virtual bool returnsInMinuit2ParameterSpace () const

Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
IBaseFunctionMultiDimTempl ()

virtual ~IBaseFunctionMultiDimTempl ()
virtual destructor More...

virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
Clone a function. More...

virtual unsigned int NDim () const =0
Retrieve the dimension of the function. More...

operator() (const T *x) const
Evaluate the function at a point x[]. More...

Public Member Functions inherited from ROOT::Math::IGradientMultiDimTempl< T >
virtual destructor More...

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. More...

Derivative (const T *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate. More...

virtual void FdF (const T *x, T &f, T *df) const =0
Optimized method to evaluate at the same time the function value and derivative at a point x. More...

Evaluate all the vector of function derivatives (gradient) at a point x. More...

## Private Member Functions

double DoDerivative (const double *, unsigned int) const override

double DoEval (const double *x) const override

## Private Attributes

const Func * fChi2

unsigned int fIndex

Public Types inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc

Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType

typedef IBaseFunctionMultiDimTempl< T > BaseFunc

Inheritance diagram for ROOT::Math::LSResidualFunc< Func >:
[legend]

## ◆ LSResidualFunc() [1/3]

template<class Func >
 ROOT::Math::LSResidualFunc< Func >::LSResidualFunc ( )
inline

Definition at line 139 of file GSLNLSMinimizer.cxx.

## ◆ LSResidualFunc() [2/3]

template<class Func >
 ROOT::Math::LSResidualFunc< Func >::LSResidualFunc ( const Func & func, unsigned int i )
inline

Definition at line 143 of file GSLNLSMinimizer.cxx.

## ◆ LSResidualFunc() [3/3]

template<class Func >
 ROOT::Math::LSResidualFunc< Func >::LSResidualFunc ( const LSResidualFunc< Func > & rhs )
inline

Definition at line 150 of file GSLNLSMinimizer.cxx.

## ◆ Clone()

template<class Func >
 IMultiGenFunction * ROOT::Math::LSResidualFunc< Func >::Clone ( ) const
inlineoverridevirtual

Clone a function.

Each derived class must implement their version of the Clone method

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

Definition at line 165 of file GSLNLSMinimizer.cxx.

## ◆ DoDerivative()

template<class Func >
 double ROOT::Math::LSResidualFunc< Func >::DoDerivative ( const double * , unsigned int ) const
inlineoverrideprivate

Definition at line 187 of file GSLNLSMinimizer.cxx.

## ◆ DoEval()

template<class Func >
 double ROOT::Math::LSResidualFunc< Func >::DoEval ( const double * x ) const
inlineoverrideprivate

Definition at line 183 of file GSLNLSMinimizer.cxx.

## ◆ FdF()

template<class Func >
 void ROOT::Math::LSResidualFunc< Func >::FdF ( const double * x, double & f, double * g ) const
inlineoverride

Definition at line 176 of file GSLNLSMinimizer.cxx.

template<class Func >
 void ROOT::Math::LSResidualFunc< Func >::Gradient ( const double * x, double * g ) const
inlineoverride

Definition at line 171 of file GSLNLSMinimizer.cxx.

## ◆ NDim()

template<class Func >
 unsigned int ROOT::Math::LSResidualFunc< Func >::NDim ( ) const
inlineoverridevirtual

Retrieve the dimension of the function.

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

Definition at line 169 of file GSLNLSMinimizer.cxx.

## ◆ operator=()

template<class Func >
 LSResidualFunc< Func > & ROOT::Math::LSResidualFunc< Func >::operator= ( const LSResidualFunc< Func > & rhs )
inline

Definition at line 158 of file GSLNLSMinimizer.cxx.

## ◆ fChi2

template<class Func >
 const Func* ROOT::Math::LSResidualFunc< Func >::fChi2
private

Definition at line 194 of file GSLNLSMinimizer.cxx.

## ◆ fIndex

template<class Func >
 unsigned int ROOT::Math::LSResidualFunc< Func >::fIndex
private

Definition at line 193 of file GSLNLSMinimizer.cxx.

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