Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches

GSLNLSMinimizer class for Non Linear Least Square fitting It Uses the Levemberg-Marquardt algorithm from GSL Non Linear Least Square fitting.

Definition at line 60 of file GSLNLSMinimizer.h.

Public Member Functions

 GSLNLSMinimizer (const char *=nullptr)
 Constructor from name.
 GSLNLSMinimizer (int type)
 Constructor from a type.
 ~GSLNLSMinimizer () override
 Destructor (no operations).
virtual void Clear ()
 Reset for consecutive minimization - implement if needed.
virtual bool Contour (unsigned int ivar, unsigned int jvar, unsigned int &npoints, double *xi, double *xj)
 Find the contour points (xi, xj) of the function for parameter ivar and jvar around the minimum.
virtual double Correlation (unsigned int i, unsigned int j) const
double CovMatrix (unsigned int, unsigned int) const override
 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 override
 return covariance matrix status
double Edm () const override
 return expected distance reached from the minimum
double ErrorDef () const
const doubleErrors () const override
 return errors at the minimum
bool FixVariable (unsigned int ivar) override
 fix an existing variable
virtual bool GetCovMatrix (double *covMat) const
 Fill the passed array with the covariance matrix elements if the variable is fixed or const the value is zero.
virtual bool GetHessianMatrix (double *hMat) const
 Fill the passed array with the Hessian matrix elements The Hessian matrix is the matrix of the second derivatives and is the inverse of the covariance matrix If the variable is fixed or const the values for that variables are zero.
virtual bool GetMinosError (unsigned int ivar, double &errLow, double &errUp, int option=0)
 Minos error for variable i, return false if Minos failed or not supported and the lower and upper errors are returned in errLow and errUp An extra flag specifies if only the lower (option=-1) or the upper (option=+1) error calculation is run.
bool GetVariableSettings (unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const override
 get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
virtual std::vector< doubleGlobalCC () const
const ROOT::Math::IMultiGradFunctionGradObjFunction () const
 return pointer to used gradient object function (NULL if gradient is not supported)
virtual bool Hesse ()
 Perform a full calculation of the Hessian matrix for error calculation.
bool IsFixedVariable (unsigned int ivar) const override
 query if an existing variable is fixed (i.e.
bool IsValidError () const
unsigned int MaxFunctionCalls () const
 Max number of function calls.
unsigned int MaxIterations () const
 Max iterations.
const doubleMinGradient () const override
 return pointer to gradient values at the minimum
bool Minimize () override
 method to perform the minimization
virtual int MinosStatus () const
 Status code of Minos (to be re-implemented by the minimizers supporting Minos).
double MinValue () const override
 return minimum function value
unsigned int NCalls () const override
 number of function calls to reach the minimum
unsigned int NDim () const override
 number of dimensions
unsigned int NFree () const override
 number of free variables (real dimension of the problem)
virtual unsigned int NIterations () const
 Number of iterations to reach the minimum.
virtual unsigned int NPar () const
 total number of parameter defined
const ROOT::Math::IMultiGenFunctionObjFunction () const
 return pointer to used objective function
virtual MinimizerOptions Options () const
 Retrieve the minimizer options (implement derived class if needed).
double Precision () const
 Precision of minimizer in the evaluation of the objective function.
int PrintLevel () const
 Set print level.
void PrintResult () const
 print result of minimization
virtual void PrintResults ()
 Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printing).
bool ProvidesError () const override
 number of free variables (real dimension of the problem) this is <= Function().NDim() which is the total
bool ReleaseVariable (unsigned int ivar) override
 release an existing variable
virtual bool Scan (unsigned int ivar, unsigned int &nstep, double *x, double *y, double xmin=0, double xmax=0)
 Scan function minimum for variable i.
virtual bool SetCovariance (std::span< const double > cov, unsigned int nrow)
 Set initial covariance matrix.
virtual bool SetCovarianceDiag (std::span< const double > d2, unsigned int n)
 Set initial second derivatives.
void SetDefaultOptions ()
 Reset the default options (defined in MinimizerOptions).
void SetErrorDef (double up)
 Set scale for calculating the errors.
void SetExtraOptions (const IOptions &extraOptions)
 Set only the extra options.
bool SetFixedVariable (unsigned int, const std::string &, double) override
 set fixed variable (override if minimizer supports them )
void SetFunction (const ROOT::Math::IMultiGenFunction &func) override
 set the function to minimize
virtual void SetHessianFunction (std::function< bool(std::span< const double >, double *)>)
 Set the function implementing Hessian computation (re-implemented by Minimizer using it).
bool SetLimitedVariable (unsigned int ivar, const std::string &name, double val, double step, double, double) override
 set upper/lower limited variable (override if minimizer supports them )
bool SetLowerLimitedVariable (unsigned int ivar, const std::string &name, double val, double step, double lower) override
 set lower limit variable (override if minimizer supports them )
void SetMaxFunctionCalls (unsigned int maxfcn)
 Set maximum of function calls.
void SetMaxIterations (unsigned int maxiter)
 Set maximum iterations (one iteration can have many function calls).
void SetOptions (const MinimizerOptions &opt)
 Set all options in one go.
void SetPrecision (double prec)
 Set in the minimizer the objective function evaluation precision.
void SetPrintLevel (int level)
 Set print level.
void SetStrategy (int strategyLevel)
 Set the strategy.
void SetTolerance (double tol)
 Set the tolerance.
bool SetUpperLimitedVariable (unsigned int ivar, const std::string &name, double val, double step, double upper) override
 set upper limit variable (override if minimizer supports them )
void SetValidError (bool on)
 Flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit).
bool SetVariable (unsigned int ivar, const std::string &name, double val, double step) override
 set free variable
virtual bool SetVariableInitialRange (unsigned int, double, double)
 Set the initial range of an existing variable.
bool SetVariableLimits (unsigned int ivar, double lower, double upper) override
 set the limits of an already existing variable
bool SetVariableLowerLimit (unsigned int ivar, double lower) override
 set the lower-limit of an already existing variable
template<class VariableIterator>
int SetVariables (const VariableIterator &begin, const VariableIterator &end)
 Add variables.
bool SetVariableStepSize (unsigned int ivar, double step) override
 set the step size of an already existing variable
bool SetVariableUpperLimit (unsigned int ivar, double upper) override
 set the upper-limit of an already existing variable
bool SetVariableValue (unsigned int ivar, double val) override
 set the value of an existing variable
bool SetVariableValues (const double *x) override
 set the values of all existing variables (array must be dimensioned to the size of existing parameters)
int Status () const
 Status code of minimizer.
virtual const doubleStepSizes () const
 accessor methods
int Strategy () const
 Strategy.
double Tolerance () const
 Absolute tolerance.
int VariableIndex (const std::string &name) const override
 get index of variable given a variable given a name return -1 if variable is not found
std::string VariableName (unsigned int ivar) const override
 get name of variables (override if minimizer support storing of variable names)
const doubleX () const override
 return pointer to X values at the minimum

Protected Member Functions

bool CheckDimension () const
bool CheckObjFunction () const
MinimTransformFunctionCreateTransformation (std::vector< double > &startValues, const ROOT::Math::IMultiGradFunction *func=nullptr)
template<class Func, class FitterType>
bool DoMinimize (const Func &f, FitterType *fitter)
 Internal method to perform minimization template on the type of method function.
void SetFinalValues (const double *x, const MinimTransformFunction *func=nullptr)
void SetMinValue (double val)

Protected Attributes

MinimizerOptions fOptions
 minimizer options
int fStatus = -1
 status of minimizer
bool fValidError = false
 flag to control if errors have been validated (Hesse has been run in case of Minuit)

Private Attributes

std::map< unsigned int, std::pair< double, double > > fBounds
 map specifying the bound using as key the parameter index
std::vector< doublefCovMatrix
unsigned int fDim
double fEdm
std::vector< doublefErrors
ROOT::Math::GSLMultiFitfGSLMultiFit = nullptr
ROOT::Math::GSLMultiFit2fGSLMultiFit2 = nullptr
double fLSTolerance
double fMinVal
std::vector< std::string > fNames
unsigned int fNCalls
unsigned int fNFree
const ROOT::Math::IMultiGenFunctionfObjFunc
std::vector< doublefSteps
bool fUseGradFunction = false
std::vector< doublefValues
std::vector< ROOT::Math::EMinimVariableTypefVarTypes
 vector specifying the type of variables

#include <Math/GSLNLSMinimizer.h>

Inheritance diagram for ROOT::Math::GSLNLSMinimizer:
ROOT::Math::BasicMinimizer ROOT::Math::Minimizer

Constructor & Destructor Documentation

◆ GSLNLSMinimizer() [1/2]

ROOT::Math::GSLNLSMinimizer::GSLNLSMinimizer ( int type)
explicit

Constructor from a type.

Definition at line 205 of file GSLNLSMinimizer.cxx.

◆ GSLNLSMinimizer() [2/2]

ROOT::Math::GSLNLSMinimizer::GSLNLSMinimizer ( const char * name = nullptr)
explicit

Constructor from name.

Definition at line 203 of file GSLNLSMinimizer.cxx.

◆ ~GSLNLSMinimizer()

ROOT::Math::GSLNLSMinimizer::~GSLNLSMinimizer ( )
override

Destructor (no operations).

Definition at line 246 of file GSLNLSMinimizer.cxx.

Member Function Documentation

◆ CheckDimension()

bool ROOT::Math::BasicMinimizer::CheckDimension ( ) const
protectedinherited

Definition at line 247 of file BasicMinimizer.cxx.

◆ CheckObjFunction()

bool ROOT::Math::BasicMinimizer::CheckObjFunction ( ) const
protectedinherited

Definition at line 256 of file BasicMinimizer.cxx.

◆ Clear()

virtual void ROOT::Math::Minimizer::Clear ( )
inlinevirtualinherited

Reset for consecutive minimization - implement if needed.

Reimplemented in ROOT::Math::GeneticMinimizer, and ROOT::Minuit2::Minuit2Minimizer.

Definition at line 141 of file Minimizer.h.

◆ Contour()

bool ROOT::Math::Minimizer::Contour ( unsigned int ivar,
unsigned int jvar,
unsigned int & npoints,
double * xi,
double * xj )
virtualinherited

Find the contour points (xi, xj) of the function for parameter ivar and jvar around the minimum.

The contour will be find for value of the function = Min + ErrorUp();

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 219 of file Minimizer.cxx.

◆ Correlation()

virtual double ROOT::Math::Minimizer::Correlation ( unsigned int i,
unsigned int j ) const
inlinevirtualinherited
Returns
correlation coefficient between variable i and j. If the variable is fixed or const the return value is zero

Reimplemented in ROOT::Minuit2::Minuit2Minimizer.

Definition at line 281 of file Minimizer.h.

◆ CovMatrix()

double ROOT::Math::GSLNLSMinimizer::CovMatrix ( unsigned int i,
unsigned int j ) const
overridevirtual

return covariance matrices elements if the variable is fixed the matrix is zero The ordering of the variables is the same as in errors

Reimplemented from ROOT::Math::Minimizer.

Definition at line 513 of file GSLNLSMinimizer.cxx.

◆ CovMatrixStatus()

int ROOT::Math::GSLNLSMinimizer::CovMatrixStatus ( ) const
overridevirtual

return covariance matrix status

Reimplemented from ROOT::Math::Minimizer.

Definition at line 524 of file GSLNLSMinimizer.cxx.

◆ CreateTransformation()

MinimTransformFunction * ROOT::Math::BasicMinimizer::CreateTransformation ( std::vector< double > & startValues,
const ROOT::Math::IMultiGradFunction * func = nullptr )
protectedinherited

Definition at line 265 of file BasicMinimizer.cxx.

◆ DoMinimize()

template<class Func, class FitterType>
bool ROOT::Math::GSLNLSMinimizer::DoMinimize ( const Func & f,
FitterType * fitter )
protected

Internal method to perform minimization template on the type of method function.

Definition at line 311 of file GSLNLSMinimizer.cxx.

◆ Edm()

double ROOT::Math::GSLNLSMinimizer::Edm ( ) const
inlineoverridevirtual

return expected distance reached from the minimum

Reimplemented from ROOT::Math::Minimizer.

Definition at line 88 of file GSLNLSMinimizer.h.

◆ ErrorDef()

double ROOT::Math::Minimizer::ErrorDef ( ) const
inlineinherited
Returns
the statistical scale used for calculate the error is typically 1 for Chi2 and 0.5 for likelihood minimization

Definition at line 334 of file Minimizer.h.

◆ Errors()

const double * ROOT::Math::GSLNLSMinimizer::Errors ( ) const
inlineoverridevirtual

return errors at the minimum

Reimplemented from ROOT::Math::Minimizer.

Definition at line 105 of file GSLNLSMinimizer.h.

◆ FixVariable()

bool ROOT::Math::BasicMinimizer::FixVariable ( unsigned int ivar)
overridevirtualinherited

fix an existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 182 of file BasicMinimizer.cxx.

◆ GetCovMatrix()

bool ROOT::Math::Minimizer::GetCovMatrix ( double * covMat) const
virtualinherited

Fill the passed array with the covariance matrix elements if the variable is fixed or const the value is zero.

The array will be filled as cov[i *ndim + j] The ordering of the variables is the same as in errors and parameter value. This is different from the direct interface of Minuit2 or TMinuit where the values were obtained only to variable parameters

Reimplemented in ROOT::Math::RMinimizer, ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 144 of file Minimizer.cxx.

◆ GetHessianMatrix()

bool ROOT::Math::Minimizer::GetHessianMatrix ( double * hMat) const
virtualinherited

Fill the passed array with the Hessian matrix elements The Hessian matrix is the matrix of the second derivatives and is the inverse of the covariance matrix If the variable is fixed or const the values for that variables are zero.

The array will be filled as h[i *ndim + j]

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 157 of file Minimizer.cxx.

◆ GetMinosError()

bool ROOT::Math::Minimizer::GetMinosError ( unsigned int ivar,
double & errLow,
double & errUp,
int option = 0 )
virtualinherited

Minos error for variable i, return false if Minos failed or not supported and the lower and upper errors are returned in errLow and errUp An extra flag specifies if only the lower (option=-1) or the upper (option=+1) error calculation is run.

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 180 of file Minimizer.cxx.

◆ GetVariableSettings()

bool ROOT::Math::BasicMinimizer::GetVariableSettings ( unsigned int ivar,
ROOT::Fit::ParameterSettings & varObj ) const
overridevirtualinherited

get variable settings in a variable object (like ROOT::Fit::ParamsSettings)

Reimplemented from ROOT::Math::Minimizer.

Definition at line 211 of file BasicMinimizer.cxx.

◆ GlobalCC()

std::vector< double > ROOT::Math::Minimizer::GlobalCC ( ) const
virtualinherited
Returns
global correlation coefficient for variable i. This is a number between zero and one which gives the correlation between the i-th parameter and that linear combination of all other parameters which is most strongly correlated with i. Minimizer must overload method if implemented

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 170 of file Minimizer.cxx.

◆ GradObjFunction()

const ROOT::Math::IMultiGradFunction * ROOT::Math::BasicMinimizer::GradObjFunction ( ) const
inherited

return pointer to used gradient object function (NULL if gradient is not supported)

Definition at line 325 of file BasicMinimizer.cxx.

◆ Hesse()

bool ROOT::Math::Minimizer::Hesse ( )
virtualinherited

Perform a full calculation of the Hessian matrix for error calculation.

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 193 of file Minimizer.cxx.

◆ IsFixedVariable()

bool ROOT::Math::BasicMinimizer::IsFixedVariable ( unsigned int ivar) const
overridevirtualinherited

query if an existing variable is fixed (i.e.

considered constant in the minimization) note that by default all variables are not fixed

Reimplemented from ROOT::Math::Minimizer.

Definition at line 206 of file BasicMinimizer.cxx.

◆ IsValidError()

bool ROOT::Math::Minimizer::IsValidError ( ) const
inlineinherited
Returns
true if Minimizer has performed a detailed error validation (e.g. run Hesse for Minuit)

Definition at line 337 of file Minimizer.h.

◆ MaxFunctionCalls()

unsigned int ROOT::Math::Minimizer::MaxFunctionCalls ( ) const
inlineinherited

Max number of function calls.

Definition at line 311 of file Minimizer.h.

◆ MaxIterations()

unsigned int ROOT::Math::Minimizer::MaxIterations ( ) const
inlineinherited

Max iterations.

Definition at line 314 of file Minimizer.h.

◆ MinGradient()

const double * ROOT::Math::GSLNLSMinimizer::MinGradient ( ) const
overridevirtual

return pointer to gradient values at the minimum

Reimplemented from ROOT::Math::Minimizer.

Definition at line 507 of file GSLNLSMinimizer.cxx.

◆ Minimize()

bool ROOT::Math::GSLNLSMinimizer::Minimize ( )
overridevirtual

method to perform the minimization

Reimplemented from ROOT::Math::BasicMinimizer.

Definition at line 265 of file GSLNLSMinimizer.cxx.

◆ MinosStatus()

virtual int ROOT::Math::Minimizer::MinosStatus ( ) const
inlinevirtualinherited

Status code of Minos (to be re-implemented by the minimizers supporting Minos).

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 330 of file Minimizer.h.

◆ MinValue()

double ROOT::Math::BasicMinimizer::MinValue ( ) const
inlineoverridevirtualinherited

return minimum function value

Implements ROOT::Math::Minimizer.

Definition at line 115 of file BasicMinimizer.h.

◆ NCalls()

unsigned int ROOT::Math::GSLNLSMinimizer::NCalls ( ) const
inlineoverridevirtual

number of function calls to reach the minimum

Reimplemented from ROOT::Math::Minimizer.

Definition at line 95 of file GSLNLSMinimizer.h.

◆ NDim()

unsigned int ROOT::Math::BasicMinimizer::NDim ( ) const
inlineoverridevirtualinherited

number of dimensions

Implements ROOT::Math::Minimizer.

Definition at line 121 of file BasicMinimizer.h.

◆ NFree()

unsigned int ROOT::Math::BasicMinimizer::NFree ( ) const
overridevirtualinherited

number of free variables (real dimension of the problem)

Reimplemented from ROOT::Math::Minimizer.

Definition at line 330 of file BasicMinimizer.cxx.

◆ NIterations()

virtual unsigned int ROOT::Math::Minimizer::NIterations ( ) const
inlinevirtualinherited

Number of iterations to reach the minimum.

Definition at line 248 of file Minimizer.h.

◆ NPar()

virtual unsigned int ROOT::Math::BasicMinimizer::NPar ( ) const
inlinevirtualinherited

total number of parameter defined

Definition at line 127 of file BasicMinimizer.h.

◆ ObjFunction()

const ROOT::Math::IMultiGenFunction * ROOT::Math::BasicMinimizer::ObjFunction ( ) const
inlineinherited

return pointer to used objective function

Definition at line 130 of file BasicMinimizer.h.

◆ Options()

virtual MinimizerOptions ROOT::Math::Minimizer::Options ( ) const
inlinevirtualinherited

Retrieve the minimizer options (implement derived class if needed).

Reimplemented in ROOT::Math::GeneticMinimizer.

Definition at line 340 of file Minimizer.h.

◆ Precision()

double ROOT::Math::Minimizer::Precision ( ) const
inlineinherited

Precision of minimizer in the evaluation of the objective function.

(a value <=0 corresponds to the let the minimizer choose its default one)

Definition at line 321 of file Minimizer.h.

◆ PrintLevel()

int ROOT::Math::Minimizer::PrintLevel ( ) const
inlineinherited

Set print level.

Definition at line 308 of file Minimizer.h.

◆ PrintResult()

void ROOT::Math::BasicMinimizer::PrintResult ( ) const
inherited

print result of minimization

Definition at line 313 of file BasicMinimizer.cxx.

◆ PrintResults()

virtual void ROOT::Math::Minimizer::PrintResults ( )
inlinevirtualinherited

Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printing).

Returns
reference to the objective function virtual const ROOT::Math::IGenFunction & Function() const = 0;

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 299 of file Minimizer.h.

◆ ProvidesError()

bool ROOT::Math::GSLNLSMinimizer::ProvidesError ( ) const
inlineoverridevirtual

number of free variables (real dimension of the problem) this is <= Function().NDim() which is the total

minimizer provides error and error matrix

Reimplemented from ROOT::Math::Minimizer.

Definition at line 102 of file GSLNLSMinimizer.h.

◆ ReleaseVariable()

bool ROOT::Math::BasicMinimizer::ReleaseVariable ( unsigned int ivar)
overridevirtualinherited

release an existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 189 of file BasicMinimizer.cxx.

◆ Scan()

bool ROOT::Math::Minimizer::Scan ( unsigned int ivar,
unsigned int & nstep,
double * x,
double * y,
double xmin = 0,
double xmax = 0 )
virtualinherited

Scan function minimum for variable i.

Variable and function must be set before using Scan.

Returns
false if an error or if minimizer does not support this functionality

Reimplemented in ROOT::Minuit2::Minuit2Minimizer, and TMinuitMinimizer.

Definition at line 203 of file Minimizer.cxx.

◆ SetCovariance()

bool ROOT::Math::Minimizer::SetCovariance ( std::span< const double > cov,
unsigned int nrow )
virtualinherited

Set initial covariance matrix.

Set initial values for covariance/error matrix.

The covariance matrix must be provided in compressed form (row-major ordered upper traingular part)

Reimplemented in ROOT::Minuit2::Minuit2Minimizer.

Definition at line 26 of file Minimizer.cxx.

◆ SetCovarianceDiag()

bool ROOT::Math::Minimizer::SetCovarianceDiag ( std::span< const double > d2,
unsigned int n )
virtualinherited

Set initial second derivatives.

set initial second derivatives

Reimplemented in ROOT::Minuit2::Minuit2Minimizer.

Definition at line 15 of file Minimizer.cxx.

◆ SetDefaultOptions()

void ROOT::Math::Minimizer::SetDefaultOptions ( )
inlineinherited

Reset the default options (defined in MinimizerOptions).

Definition at line 378 of file Minimizer.h.

◆ SetErrorDef()

void ROOT::Math::Minimizer::SetErrorDef ( double up)
inlineinherited

Set scale for calculating the errors.

Definition at line 364 of file Minimizer.h.

◆ SetExtraOptions()

void ROOT::Math::Minimizer::SetExtraOptions ( const IOptions & extraOptions)
inlineinherited

Set only the extra options.

Definition at line 375 of file Minimizer.h.

◆ SetFinalValues()

void ROOT::Math::BasicMinimizer::SetFinalValues ( const double * x,
const MinimTransformFunction * func = nullptr )
protectedinherited

Definition at line 300 of file BasicMinimizer.cxx.

◆ SetFixedVariable()

bool ROOT::Math::BasicMinimizer::SetFixedVariable ( unsigned int ivar,
const std::string & name,
double val )
overridevirtualinherited

set fixed variable (override if minimizer supports them )

Reimplemented from ROOT::Math::Minimizer.

Definition at line 116 of file BasicMinimizer.cxx.

◆ SetFunction()

void ROOT::Math::GSLNLSMinimizer::SetFunction ( const ROOT::Math::IMultiGenFunction & func)
overridevirtual

set the function to minimize

Reimplemented from ROOT::Math::BasicMinimizer.

Definition at line 254 of file GSLNLSMinimizer.cxx.

◆ SetHessianFunction()

virtual void ROOT::Math::Minimizer::SetHessianFunction ( std::function< bool(std::span< const double >, double *)> )
inlinevirtualinherited

Set the function implementing Hessian computation (re-implemented by Minimizer using it).

Reimplemented in ROOT::Minuit2::Minuit2Minimizer.

Definition at line 147 of file Minimizer.h.

◆ SetLimitedVariable()

bool ROOT::Math::BasicMinimizer::SetLimitedVariable ( unsigned int ivar,
const std::string & name,
double val,
double step,
double lower,
double upper )
overridevirtualinherited

set upper/lower limited variable (override if minimizer supports them )

Reimplemented from ROOT::Math::Minimizer.

Definition at line 107 of file BasicMinimizer.cxx.

◆ SetLowerLimitedVariable()

bool ROOT::Math::BasicMinimizer::SetLowerLimitedVariable ( unsigned int ivar,
const std::string & name,
double val,
double step,
double lower )
overridevirtualinherited

set lower limit variable (override if minimizer supports them )

Reimplemented from ROOT::Math::Minimizer.

Definition at line 88 of file BasicMinimizer.cxx.

◆ SetMaxFunctionCalls()

void ROOT::Math::Minimizer::SetMaxFunctionCalls ( unsigned int maxfcn)
inlineinherited

Set maximum of function calls.

Definition at line 348 of file Minimizer.h.

◆ SetMaxIterations()

void ROOT::Math::Minimizer::SetMaxIterations ( unsigned int maxiter)
inlineinherited

Set maximum iterations (one iteration can have many function calls).

Definition at line 351 of file Minimizer.h.

◆ SetMinValue()

void ROOT::Math::BasicMinimizer::SetMinValue ( double val)
inlineprotectedinherited

Definition at line 152 of file BasicMinimizer.h.

◆ SetOptions()

void ROOT::Math::Minimizer::SetOptions ( const MinimizerOptions & opt)
inlineinherited

Set all options in one go.

Definition at line 370 of file Minimizer.h.

◆ SetPrecision()

void ROOT::Math::Minimizer::SetPrecision ( double prec)
inlineinherited

Set in the minimizer the objective function evaluation precision.

(a value <=0 means the minimizer will choose its optimal value automatically, i.e. default case)

Definition at line 358 of file Minimizer.h.

◆ SetPrintLevel()

void ROOT::Math::Minimizer::SetPrintLevel ( int level)
inlineinherited

Set print level.

Definition at line 345 of file Minimizer.h.

◆ SetStrategy()

void ROOT::Math::Minimizer::SetStrategy ( int strategyLevel)
inlineinherited

Set the strategy.

Definition at line 361 of file Minimizer.h.

◆ SetTolerance()

void ROOT::Math::Minimizer::SetTolerance ( double tol)
inlineinherited

Set the tolerance.

Definition at line 354 of file Minimizer.h.

◆ SetUpperLimitedVariable()

bool ROOT::Math::BasicMinimizer::SetUpperLimitedVariable ( unsigned int ivar,
const std::string & name,
double val,
double step,
double upper )
overridevirtualinherited

set upper limit variable (override if minimizer supports them )

Reimplemented from ROOT::Math::Minimizer.

Definition at line 97 of file BasicMinimizer.cxx.

◆ SetValidError()

void ROOT::Math::Minimizer::SetValidError ( bool on)
inlineinherited

Flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit).

Definition at line 367 of file Minimizer.h.

◆ SetVariable()

bool ROOT::Math::BasicMinimizer::SetVariable ( unsigned int ivar,
const std::string & name,
double val,
double step )
overridevirtualinherited

set free variable

Implements ROOT::Math::Minimizer.

Definition at line 63 of file BasicMinimizer.cxx.

◆ SetVariableInitialRange()

virtual bool ROOT::Math::Minimizer::SetVariableInitialRange ( unsigned int ,
double ,
double  )
inlinevirtualinherited

Set the initial range of an existing variable.

Definition at line 225 of file Minimizer.h.

◆ SetVariableLimits()

bool ROOT::Math::BasicMinimizer::SetVariableLimits ( unsigned int ivar,
double lower,
double upper )
overridevirtualinherited

set the limits of an already existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 159 of file BasicMinimizer.cxx.

◆ SetVariableLowerLimit()

bool ROOT::Math::BasicMinimizer::SetVariableLowerLimit ( unsigned int ivar,
double lower )
overridevirtualinherited

set the lower-limit of an already existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 147 of file BasicMinimizer.cxx.

◆ SetVariables()

template<class VariableIterator>
int ROOT::Math::Minimizer::SetVariables ( const VariableIterator & begin,
const VariableIterator & end )
inlineinherited

Add variables.

Returns
number of variables successfully added

Definition at line 151 of file Minimizer.h.

◆ SetVariableStepSize()

bool ROOT::Math::BasicMinimizer::SetVariableStepSize ( unsigned int ivar,
double step )
overridevirtualinherited

set the step size of an already existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 140 of file BasicMinimizer.cxx.

◆ SetVariableUpperLimit()

bool ROOT::Math::BasicMinimizer::SetVariableUpperLimit ( unsigned int ivar,
double upper )
overridevirtualinherited

set the upper-limit of an already existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 153 of file BasicMinimizer.cxx.

◆ SetVariableValue()

bool ROOT::Math::BasicMinimizer::SetVariableValue ( unsigned int ivar,
double val )
overridevirtualinherited

set the value of an existing variable

Reimplemented from ROOT::Math::Minimizer.

Definition at line 125 of file BasicMinimizer.cxx.

◆ SetVariableValues()

bool ROOT::Math::BasicMinimizer::SetVariableValues ( const double * x)
overridevirtualinherited

set the values of all existing variables (array must be dimensioned to the size of existing parameters)

Reimplemented from ROOT::Math::Minimizer.

Definition at line 133 of file BasicMinimizer.cxx.

◆ Status()

int ROOT::Math::Minimizer::Status ( ) const
inlineinherited

Status code of minimizer.

Definition at line 327 of file Minimizer.h.

◆ StepSizes()

virtual const double * ROOT::Math::BasicMinimizer::StepSizes ( ) const
inlinevirtualinherited

accessor methods

Definition at line 140 of file BasicMinimizer.h.

◆ Strategy()

int ROOT::Math::Minimizer::Strategy ( ) const
inlineinherited

Strategy.

Definition at line 324 of file Minimizer.h.

◆ Tolerance()

double ROOT::Math::Minimizer::Tolerance ( ) const
inlineinherited

Absolute tolerance.

Definition at line 317 of file Minimizer.h.

◆ VariableIndex()

int ROOT::Math::BasicMinimizer::VariableIndex ( const std::string & name) const
overridevirtualinherited

get index of variable given a variable given a name return -1 if variable is not found

Reimplemented from ROOT::Math::Minimizer.

Definition at line 232 of file BasicMinimizer.cxx.

◆ VariableName()

std::string ROOT::Math::BasicMinimizer::VariableName ( unsigned int ivar) const
overridevirtualinherited

get name of variables (override if minimizer support storing of variable names)

Reimplemented from ROOT::Math::Minimizer.

Definition at line 227 of file BasicMinimizer.cxx.

◆ X()

const double * ROOT::Math::BasicMinimizer::X ( ) const
inlineoverridevirtualinherited

return pointer to X values at the minimum

Implements ROOT::Math::Minimizer.

Definition at line 118 of file BasicMinimizer.h.

Member Data Documentation

◆ fBounds

std::map< unsigned int, std::pair<double, double> > ROOT::Math::BasicMinimizer::fBounds
privateinherited

map specifying the bound using as key the parameter index

Definition at line 166 of file BasicMinimizer.h.

◆ fCovMatrix

std::vector<double> ROOT::Math::GSLNLSMinimizer::fCovMatrix
private

Definition at line 141 of file GSLNLSMinimizer.h.

◆ fDim

unsigned int ROOT::Math::BasicMinimizer::fDim
privateinherited

Definition at line 157 of file BasicMinimizer.h.

◆ fEdm

double ROOT::Math::GSLNLSMinimizer::fEdm
private

Definition at line 138 of file GSLNLSMinimizer.h.

◆ fErrors

std::vector<double> ROOT::Math::GSLNLSMinimizer::fErrors
private

Definition at line 140 of file GSLNLSMinimizer.h.

◆ fGSLMultiFit

ROOT::Math::GSLMultiFit* ROOT::Math::GSLNLSMinimizer::fGSLMultiFit = nullptr
private

Definition at line 135 of file GSLNLSMinimizer.h.

◆ fGSLMultiFit2

ROOT::Math::GSLMultiFit2* ROOT::Math::GSLNLSMinimizer::fGSLMultiFit2 = nullptr
private

Definition at line 136 of file GSLNLSMinimizer.h.

◆ fLSTolerance

double ROOT::Math::GSLNLSMinimizer::fLSTolerance
private

Definition at line 139 of file GSLNLSMinimizer.h.

◆ fMinVal

double ROOT::Math::BasicMinimizer::fMinVal
privateinherited

Definition at line 161 of file BasicMinimizer.h.

◆ fNames

std::vector<std::string> ROOT::Math::BasicMinimizer::fNames
privateinherited

Definition at line 164 of file BasicMinimizer.h.

◆ fNCalls

unsigned int ROOT::Math::GSLNLSMinimizer::fNCalls
private

Definition at line 133 of file GSLNLSMinimizer.h.

◆ fNFree

unsigned int ROOT::Math::GSLNLSMinimizer::fNFree
private

Definition at line 132 of file GSLNLSMinimizer.h.

◆ fObjFunc

const ROOT::Math::IMultiGenFunction* ROOT::Math::BasicMinimizer::fObjFunc
privateinherited

Definition at line 159 of file BasicMinimizer.h.

◆ fOptions

MinimizerOptions ROOT::Math::Minimizer::fOptions
protectedinherited

minimizer options

Definition at line 387 of file Minimizer.h.

◆ fStatus

int ROOT::Math::Minimizer::fStatus = -1
protectedinherited

status of minimizer

Definition at line 388 of file Minimizer.h.

◆ fSteps

std::vector<double> ROOT::Math::BasicMinimizer::fSteps
privateinherited

Definition at line 163 of file BasicMinimizer.h.

◆ fUseGradFunction

bool ROOT::Math::GSLNLSMinimizer::fUseGradFunction = false
private

Definition at line 131 of file GSLNLSMinimizer.h.

◆ fValidError

bool ROOT::Math::Minimizer::fValidError = false
protectedinherited

flag to control if errors have been validated (Hesse has been run in case of Minuit)

Definition at line 386 of file Minimizer.h.

◆ fValues

std::vector<double> ROOT::Math::BasicMinimizer::fValues
privateinherited

Definition at line 162 of file BasicMinimizer.h.

◆ fVarTypes

std::vector<ROOT::Math::EMinimVariableType> ROOT::Math::BasicMinimizer::fVarTypes
privateinherited

vector specifying the type of variables

Definition at line 165 of file BasicMinimizer.h.


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