ROOT logo
ROOT » MATH » MATHMORE » ROOT::Math::GSLMinimizer

class ROOT::Math::GSLMinimizer: public ROOT::Math::Minimizer


   GSLMinimizer class.
   Implementation of the ROOT::Math::Minimizer interface using the GSL multi-dimensional
   minimization algorithms.

   See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html">GSL doc</A>
   from more info on the GSL minimization algorithms.

   The class implements the ROOT::Math::Minimizer interface and can be instantiated using the
   ROOT plugin manager (plugin name is "GSLMultiMin"). The varius minimization algorithms
   (conjugatefr, conjugatepr, bfgs, etc..) can be passed as enumerations and also as a string.
   The default algorithm is conjugatefr (Fletcher-Reeves conjugate gradient algorithm).

   @ingroup MultiMin

Function Members (Methods)

public:
virtual~GSLMinimizer()
virtual voidROOT::Math::Minimizer::Clear()
virtual boolROOT::Math::Minimizer::Contour(unsigned int, unsigned int, unsigned int&, double*, double*)
virtual doubleROOT::Math::Minimizer::Correlation(unsigned int i, unsigned int j) const
virtual doubleCovMatrix(unsigned int, unsigned int) const
virtual intROOT::Math::Minimizer::CovMatrixStatus() const
virtual doubleEdm() const
doubleROOT::Math::Minimizer::ErrorDef() const
virtual const double*Errors() const
virtual boolROOT::Math::Minimizer::GetCovMatrix(double*) const
virtual boolROOT::Math::Minimizer::GetHessianMatrix(double*) const
virtual boolROOT::Math::Minimizer::GetMinosError(unsigned int, double& errLow, double& errUp, int = 0)
virtual doubleROOT::Math::Minimizer::GlobalCC(unsigned int) const
ROOT::Math::GSLMinimizerGSLMinimizer(ROOT::Math::EGSLMinimizerType type = ROOT::Math::kConjugateFR)
ROOT::Math::GSLMinimizerGSLMinimizer(const char* type)
virtual boolROOT::Math::Minimizer::Hesse()
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 doubleMinValue() const
virtual unsigned intNCalls() const
virtual unsigned intNDim() const
virtual unsigned intNFree() const
const ROOT::Math::IMultiGradFunction*ObjFunction() const
virtual ROOT::Math::MinimizerOptionsROOT::Math::Minimizer::Options() const
doubleROOT::Math::Minimizer::Precision() const
intROOT::Math::Minimizer::PrintLevel() const
virtual voidROOT::Math::Minimizer::PrintResults()
virtual boolProvidesError() const
virtual boolROOT::Math::Minimizer::Scan(unsigned int, unsigned int&, double*, double*, double = 0, double = 0)
voidROOT::Math::Minimizer::SetDefaultOptions()
voidROOT::Math::Minimizer::SetErrorDef(double up)
virtual boolSetFixedVariable(unsigned int, const string&, double)
virtual voidSetFunction(const ROOT::Math::IMultiGenFunction& func)
virtual voidSetFunction(const ROOT::Math::IMultiGradFunction& func)
virtual boolSetLimitedVariable(unsigned int ivar, const string& name, double val, double step, double, double)
virtual boolSetLowerLimitedVariable(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 boolSetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
voidROOT::Math::Minimizer::SetValidError(bool on)
virtual boolSetVariable(unsigned int ivar, const string& name, double val, double step)
virtual boolSetVariableValue(unsigned int ivar, double val)
virtual boolSetVariableValues(const double* x)
intROOT::Math::Minimizer::Status() const
intROOT::Math::Minimizer::Strategy() const
doubleROOT::Math::Minimizer::Tolerance() const
const ROOT::Math::MinimTransformFunction*TransformFunction() const
virtual intROOT::Math::Minimizer::VariableIndex(const string&) const
virtual stringROOT::Math::Minimizer::VariableName(unsigned int) const
virtual const double*X() const

Data Members

protected:
intROOT::Math::Minimizer::fDebugprint level
unsigned intROOT::Math::Minimizer::fMaxCallsmax number of function calls
unsigned intROOT::Math::Minimizer::fMaxItermax number or iterations used to find the minimum
doubleROOT::Math::Minimizer::fPrecprecision
intROOT::Math::Minimizer::fStatusstatus of minimizer
intROOT::Math::Minimizer::fStrategyminimizer strategy
doubleROOT::Math::Minimizer::fToltolerance (absolute)
doubleROOT::Math::Minimizer::fUperror scale
boolROOT::Math::Minimizer::fValidErrorflag to control if errors have been validated (Hesse has been run in case of Minuit)
private:
map<unsigned int,std::pair<double,double> >fBoundsmap specifying the bound using as key the parameter index
unsigned intfDim
ROOT::Math::GSLMultiMinimizer*fGSLMultiMin
doublefLSToleranceLine Search Tolerance
doublefMinVal
vector<std::string>fNames
const ROOT::Math::IMultiGradFunction*fObjFunc
vector<double>fSteps
vector<double>fValues
vector<ROOT::Math::EMinimVariableType>fVarTypesvector specifyng the type of variables

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

GSLMinimizer(ROOT::Math::EGSLMinimizerType type = ROOT::Math::kConjugateFR)
      Default constructor

GSLMinimizer(const char* type)
      Constructor with a string giving name of algorithm

virtual ~GSLMinimizer()
      Destructor

GSLMinimizer(const ROOT::Math::GSLMinimizer& )
 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 SetVariable(unsigned int ivar, const string& name, double val, double step)
 set free variable
bool SetLowerLimitedVariable(unsigned int ivar, const string& name, double val, double step, double lower)
 set lower limit variable  (override if minimizer supports them )
bool SetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
 set upper limit variable (override if minimizer supports them )
bool SetLimitedVariable(unsigned int ivar, const string& name, double val, double step, double , double )
 set upper/lower limited variable (override if minimizer supports them )
bool SetFixedVariable(unsigned int , const string& , double )
 set fixed variable (override if minimizer supports them )
bool SetVariableValue(unsigned int ivar, double val)
 set the value of an existing variable
bool SetVariableValues(const double* x)
 set the values of all existing variables (array must be dimensioned to the size of existing parameters)
bool Minimize()
 method to perform the minimization
double MinValue() const
 return minimum function value
{ return fMinVal; }
double Edm() const
 return expected distance reached from the minimum
const double * X() const
 return  pointer to X values at the minimum
{ return &fValues.front(); }
const double * MinGradient() const
 return pointer to gradient values at the minimum
unsigned int NCalls() const
 number of function calls to reach the minimum
unsigned int NDim() const
 this is <= Function().NDim() which is the total
 number of variables (free+ constrained ones)
{ return fValues.size(); }
unsigned int NFree() const
 number of free variables (real dimension of the problem)
 this is <= Function().NDim() which is the total number of free parameters
{ return fObjFunc->NDim(); }
bool ProvidesError() const
 minimizer provides error and error matrix
{ return false; }
const double * Errors() const
 return errors at the minimum
double CovMatrix(unsigned int , unsigned int ) const
 return covariance matrices elements
       if the variable is fixed the matrix is zero
       The ordering of the variables is the same as in errors

{ return 0; }
const ROOT::Math::IMultiGradFunction * ObjFunction() const
 method of only GSL  minimizer (not inherited from interface)
 return pointer to used objective gradient function
{ return fObjFunc; }