ROOT logo
ROOT » MATH » MATHMORE » ROOT::Math::GSLNLSMinimizer

class ROOT::Math::GSLNLSMinimizer: public ROOT::Math::BasicMinimizer


    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:
virtual~GSLNLSMinimizer()
ROOT::Math::BasicMinimizerROOT::Math::BasicMinimizer::BasicMinimizer()
virtual voidROOT::Math::Minimizer::Clear()
virtual boolROOT::Math::Minimizer::Contour(unsigned int ivar, unsigned int jvar, unsigned int& npoints, double* xi, double* xj)
virtual doubleROOT::Math::Minimizer::Correlation(unsigned int i, unsigned int j) const
virtual doubleCovMatrix(unsigned int, unsigned int) const
virtual intCovMatrixStatus() const
virtual doubleEdm() const
doubleROOT::Math::Minimizer::ErrorDef() const
virtual const double*Errors() const
virtual boolROOT::Math::BasicMinimizer::FixVariable(unsigned int ivar)
virtual boolROOT::Math::Minimizer::GetCovMatrix(double* covMat) const
virtual boolROOT::Math::Minimizer::GetHessianMatrix(double* hMat) const
virtual boolROOT::Math::Minimizer::GetMinosError(unsigned int ivar, double& errLow, double& errUp, int option = 0)
virtual boolROOT::Math::BasicMinimizer::GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings& varObj) const
virtual doubleROOT::Math::Minimizer::GlobalCC(unsigned int ivar) const
const ROOT::Math::IMultiGradFunction*ROOT::Math::BasicMinimizer::GradObjFunction() const
ROOT::Math::GSLNLSMinimizerGSLNLSMinimizer(int type = 0)
virtual boolROOT::Math::Minimizer::Hesse()
virtual boolROOT::Math::BasicMinimizer::IsFixedVariable(unsigned int ivar) const
boolROOT::Math::Minimizer::IsValidError() const
unsigned intROOT::Math::Minimizer::MaxFunctionCalls() const
unsigned intROOT::Math::Minimizer::MaxIterations() const
virtual const double*MinGradient() const
virtual boolMinimize()
virtual doubleROOT::Math::BasicMinimizer::MinValue() const
virtual unsigned intNCalls() const
virtual unsigned intROOT::Math::BasicMinimizer::NDim() const
virtual unsigned intROOT::Math::BasicMinimizer::NFree() const
virtual unsigned intROOT::Math::Minimizer::NIterations() const
virtual unsigned intROOT::Math::BasicMinimizer::NPar() const
const ROOT::Math::IMultiGenFunction*ROOT::Math::BasicMinimizer::ObjFunction() const
virtual ROOT::Math::MinimizerOptionsROOT::Math::Minimizer::Options() const
doubleROOT::Math::Minimizer::Precision() const
intROOT::Math::Minimizer::PrintLevel() const
voidROOT::Math::BasicMinimizer::PrintResult() const
virtual voidROOT::Math::Minimizer::PrintResults()
virtual boolProvidesError() const
virtual boolROOT::Math::BasicMinimizer::ReleaseVariable(unsigned int ivar)
virtual boolROOT::Math::Minimizer::Scan(unsigned int ivar, unsigned int& nstep, double* x, double* y, double xmin = 0, double xmax = 0)
voidROOT::Math::Minimizer::SetDefaultOptions()
voidROOT::Math::Minimizer::SetErrorDef(double up)
virtual boolROOT::Math::BasicMinimizer::SetFixedVariable(unsigned int, const string&, double)
virtual voidSetFunction(const ROOT::Math::IMultiGenFunction& func)
virtual voidSetFunction(const ROOT::Math::IMultiGradFunction& func)
virtual boolROOT::Math::BasicMinimizer::SetLimitedVariable(unsigned int ivar, const string& name, double val, double step, double, double)
virtual boolROOT::Math::BasicMinimizer::SetLowerLimitedVariable(unsigned int ivar, const string& name, double val, double step, double lower)
voidROOT::Math::Minimizer::SetMaxFunctionCalls(unsigned int maxfcn)
voidROOT::Math::Minimizer::SetMaxIterations(unsigned int maxiter)
voidROOT::Math::Minimizer::SetOptions(const ROOT::Math::MinimizerOptions& opt)
voidROOT::Math::Minimizer::SetPrecision(double prec)
voidROOT::Math::Minimizer::SetPrintLevel(int level)
voidROOT::Math::Minimizer::SetStrategy(int strategyLevel)
voidROOT::Math::Minimizer::SetTolerance(double tol)
virtual boolROOT::Math::BasicMinimizer::SetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
voidROOT::Math::Minimizer::SetValidError(bool on)
virtual boolROOT::Math::BasicMinimizer::SetVariable(unsigned int ivar, const string& name, double val, double step)
virtual boolROOT::Math::Minimizer::SetVariableInitialRange(unsigned int, double, double)
virtual boolROOT::Math::BasicMinimizer::SetVariableLimits(unsigned int ivar, double lower, double upper)
virtual boolROOT::Math::BasicMinimizer::SetVariableLowerLimit(unsigned int ivar, double lower)
virtual boolROOT::Math::BasicMinimizer::SetVariableStepSize(unsigned int ivar, double step)
virtual boolROOT::Math::BasicMinimizer::SetVariableUpperLimit(unsigned int ivar, double upper)
virtual boolROOT::Math::BasicMinimizer::SetVariableValue(unsigned int ivar, double val)
virtual boolROOT::Math::BasicMinimizer::SetVariableValues(const double* x)
intROOT::Math::Minimizer::Status() const
virtual const double*ROOT::Math::BasicMinimizer::StepSizes() const
intROOT::Math::Minimizer::Strategy() const
doubleROOT::Math::Minimizer::Tolerance() const
const ROOT::Math::MinimTransformFunction*ROOT::Math::BasicMinimizer::TransformFunction() const
virtual intROOT::Math::BasicMinimizer::VariableIndex(const string& name) const
virtual stringROOT::Math::BasicMinimizer::VariableName(unsigned int ivar) const
virtual const double*ROOT::Math::BasicMinimizer::X() const

Data Members

protected:
ROOT::Math::MinimizerOptionsROOT::Math::Minimizer::fOptionsminimizer options
intROOT::Math::Minimizer::fStatusstatus of minimizer
boolROOT::Math::Minimizer::fValidErrorflag to control if errors have been validated (Hesse has been run in case of Minuit)
private:
const ROOT::Math::FitMethodFunction*fChi2Funcpointer to Least square function
vector<double>fCovMatrixcov matrix (stored as cov[ i * dim + j]
doublefEdmedm value
vector<double>fErrors
ROOT::Math::GSLMultiFit*fGSLMultiFitpointer to GSL multi fit solver
doublefLSToleranceLine Search Tolerance
unsigned intfNFreedimension of the internal function to be minimized
vector<LSResidualFunc>fResiduals! transient Vector of the residual functions
unsigned intfSizenumber of fit points (residuals)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

operator=(const ROOT::Math::GSLNLSMinimizer& rhs)
GSLNLSMinimizer(int type = 0)
      Default constructor

~GSLNLSMinimizer()
      Destructor (no operations)

GSLNLSMinimizer(const ROOT::Math::GSLNLSMinimizer& )
 usually copying is non trivial, so we make this unaccessible

      Copy constructor

{}
void SetFunction(const ROOT::Math::IMultiGenFunction& func)
 set the function to minimize
void SetFunction(const ROOT::Math::IMultiGradFunction& func)
 set gradient the function to minimize
bool Minimize()
 method to perform the minimization
double Edm() const
 return expected distance reached from the minimum
const double * MinGradient() const
 return pointer to gradient values at the minimum
unsigned int NCalls() const
 number of function calls to reach the minimum
{ return (fChi2Func) ? fChi2Func->NCalls() : 0; }
bool ProvidesError() const
 number of free variables (real dimension of the problem)
 this is <= Function().NDim() which is the total
   virtual unsigned int NFree() const { return fNFree; }
 minimizer provides error and error matrix
{ return true; }
const double * Errors() const
 return errors at the minimum
{ return (fErrors.size() > 0) ? &fErrors.front() : 0; }
double CovMatrix(unsigned int , unsigned int ) const
  {
       static std::vector<double> err;
       err.resize(fDim);
       return &err.front();
    }
 return covariance matrices elements
       if the variable is fixed the matrix is zero
       The ordering of the variables is the same as in errors

int CovMatrixStatus() const
 return covariance matrix status