ROOT logo
ROOT » MATH » MATHMORE » ROOT::Math::LSResidualFunc

class ROOT::Math::LSResidualFunc: public ROOT::Math::IGradientFunctionMultiDim


    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)

    @ingroup MultiMin

Function Members (Methods)

public:
~LSResidualFunc()
virtual ROOT::Math::IMultiGenFunction*Clone() const
doubleROOT::Math::IGradientMultiDim::Derivative(const double* x, unsigned int icoord = 0) const
virtual voidFdF(const double* x, double& f, double* g) const
virtual voidGradient(const double* x, double* g) const
ROOT::Math::LSResidualFuncLSResidualFunc()
ROOT::Math::LSResidualFuncLSResidualFunc(const ROOT::Math::LSResidualFunc& rhs)
ROOT::Math::LSResidualFuncLSResidualFunc(const ROOT::Math::FitMethodFunction& func, unsigned int i)
virtual unsigned intNDim() const
doubleROOT::Math::IBaseFunctionMultiDim::operator()(const double* x) const
ROOT::Math::LSResidualFunc&operator=(const ROOT::Math::LSResidualFunc& rhs)
private:
virtual doubleDoDerivative(const double* x, unsigned int icoord) const
virtual doubleDoEval(const double* x) const

Data Members

private:
const ROOT::Math::FitMethodFunction*fChi2
unsigned intfIndex
vector<double>fX2cached vector

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

LSResidualFunc()
default ctor (required by CINT)
{}
LSResidualFunc(const ROOT::Math::FitMethodFunction& func, unsigned int i)
{}
LSResidualFunc(const ROOT::Math::LSResidualFunc& rhs)
 copy ctor
operator=(const ROOT::Math::LSResidualFunc& rhs)
IMultiGenFunction * Clone() const
unsigned int NDim() const
{ return fChi2->NDim(); }
void Gradient(const double* x, double* g) const
FdF(x,f0,g)
double DoEval(const double* x) const
double DoDerivative(const double* x, unsigned int icoord) const
return  ROOT::Math::Derivator::Eval(*this, x, icoord, 1E-8);