ROOT   Reference Guide
Searching...
No Matches
Minimizer.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Author: L. Moneta Fri Sep 22 15:06:47 2006
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7 * *
8 * *
9 **********************************************************************/
10
11// Header file for class Minimizer
12
13#ifndef ROOT_Math_Minimizer
14#define ROOT_Math_Minimizer
15
16#include "Math/IFunction.h"
18
19#include <string>
20#include <limits>
21#include <cmath>
22#include <vector>
23#include <functional>
24
25
26
27namespace ROOT {
28
29 namespace Fit {
30 class ParameterSettings;
31 }
32
33
34 namespace Math {
35
36/**
37 @defgroup MultiMin Multi-dimensional Minimization
38 @ingroup NumAlgo
39
40 Classes implementing algorithms for multi-dimensional minimization
41 */
42
43
44
45//_______________________________________________________________________________
46/**
47 Abstract Minimizer class, defining the interface for the various minimizer
48 (like Minuit2, Minuit, GSL, etc..) in ROOT.
49 Plug-in's exist in ROOT to be able to instantiate the derived classes without linking the library
50 using the static function ROOT::Math::Factory::CreateMinimizer.
51
52 Here is the list of all possible minimizers and their respective methods (algorithms) that can be instantiated:
53 The name shown below can be used to create them. More documentation can be found in the respective class
54
55 - Minuit (class TMinuitMinimizer)
57 - MigradImproved (Migrad with adding a method to improve minimization when ends-up in a local minimum, see par. 6.3 of [Minuit tutorial on Function Minimization](https://seal.web.cern.ch/documents/minuit/mntutorial.pdf))
58 - Simplex
59 - Minimize (a combination of Simplex + Migrad)
60 - Minimize
61 - Scan
62 - Seek
63
64 - Minuit2 (class ROOT::Minuit2::Minuit2Minimizer)
66 - Simplex
67 - Minimize
68 - Fumili (Fumili2)
69 - Scan
70
71 - Fumili (class TFumiliMinimizer)
72
73 - GSLMultiMin (class ROOT::Math::GSLMinimizer) available when ROOT is built with mathmore support
74 - BFGS2 (Default)
75 - BFGS
76 - ConjugateFR
77 - ConjugatePR
78 - SteepestDescent
79
80 - GSLMultiFit (class ROOT::Math::GSLNLMinimizer) available when ROOT is built mathmore support
81
82 - GSLSimAn (class ROOT::Math::GSLSimAnMinimizer) available when ROOT is built with mathmore support
83
84 - Genetic (class ROOT::Math::GeneticMinimizer)
85
86 - RMinimizer (class ROOT::Math::RMinimizer) available when ROOT is built with r support
87 - BFGS (default)
88 - L-BFGS-S
90 - CG
91 - and more methods, see the Details in the documentation of the function optimix of the [optmix R package](https://cran.r-project.org/web/packages/optimx/optimx.pdf)
92
93
94 The Minimizer class provides the interface to perform the minimization including
95
96
97 In addition to provide the API for function minimization (via ROOT::Math::Minimizer::Minimize) the Minimizer class provides:
98 - the interface for setting the function to be minimized. The objective function passed to the Minimizer must implement the multi-dimensional generic interface
99 ROOT::Math::IBaseFunctionMultiDim. If the function provides gradient calculation (e.g. implementing the ROOT::Math::IGradientFunctionMultiDim interface)
100 the gradient will be used by the Minimizer class, when needed. There are convenient classes for the users to wrap their own functions in this required interface for minimization.
101 These are the ROOT::Math::Functor class and the ROOT::Math::GradFunctor class for wrapping functions providing both evaluation and gradient. Some methods, like Fumili, Fumili2 and GSLMultiFit are
102 specialized method for least-square and also likelihood minimizations. They require then that the given function implements in addition
103 the ROOT::Math::FitMethodFunction interface.
104 - The interface for setting the initial values for the function variables (which are the parameters in
105 of the model function in case of solving for fitting) and specifying their limits.
106 - The interface to set and retrieve basic minimization parameters. These parameter are controlled by the class ROOT::Math::MinimizerOptions.
107 When no parameters are specified the default ones are used. Specific Minimizer options can also be passed via the MinimizerOptions class.
108 For the list of the available option parameter one must look at the documentation of the corresponding derived class.
109 - The interface to retrieve the result of minimization ( minimum X values, function value, gradient, error on the minimum, etc...)
110 - The interface to perform a Scan, Hesse or a Contour plot (for the minimizers that support this, i.e. Minuit and Minuit2)
111
112 An example on how to use this interface is the tutorial NumericalMinimization.C in the tutorials/fit directory.
113
114 @ingroup MultiMin
115*/
116
118
119public:
120
121 /**
122 Default constructor
123 */
125 fValidError(false),
126 fStatus(-1)
127 {}
128
129 /**
130 Destructor (no operations)
131 */
132 virtual ~Minimizer () {}
133
134
135
136
137private:
138 // usually copying is non trivial, so we make this unaccessible
139
140 /**
141 Copy constructor
142 */
144
145 /**
146 Assignment operator
147 */
149 if (this == &rhs) return *this; // time saving self-test
150 return *this;
151 }
152
153public:
154
155 /// reset for consecutive minimization - implement if needed
156 virtual void Clear() {}
157
158 /// set the function to minimize
159 virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func) = 0;
160
161 /// set the function implementing Hessian computation (re-implemented by Minimizer using it)
162 virtual void SetHessianFunction(std::function<bool(const std::vector<double> &, double *)> ) {}
163
165 template<class VariableIterator>
166 int SetVariables(const VariableIterator & begin, const VariableIterator & end) {
167 unsigned int ivar = 0;
168 for ( VariableIterator vitr = begin; vitr != end; ++vitr) {
169 bool iret = false;
170 if (vitr->IsFixed() )
171 iret = SetFixedVariable(ivar, vitr->Name(), vitr->Value() );
172 else if (vitr->IsDoubleBound() )
173 iret = SetLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit(), vitr->UpperLimit() );
174 else if (vitr->HasLowerLimit() )
175 iret = SetLowerLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit() );
176 else if (vitr->HasUpperLimit() )
177 iret = SetUpperLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->UpperLimit() );
178 else
179 iret = SetVariable( ivar, vitr->Name(), vitr->Value(), vitr->StepSize() );
180
181 if (iret) ivar++;
182
183 // an error message should be eventually be reported in the virtual single SetVariable methods
184 }
185 return ivar;
186 }
187 /// set a new free variable
188 virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step) = 0;
189 /// set a new lower limit variable (override if minimizer supports them )
190 virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double lower ) {
191 return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_limits<double>::infinity() );
192 }
193 /// set a new upper limit variable (override if minimizer supports them )
194 virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double upper ) {
195 return SetLimitedVariable(ivar, name, val, step, - std::numeric_limits<double>::infinity(), upper );
196 }
197 virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step ,
198 double lower , double upper );
199 virtual bool SetFixedVariable(unsigned int ivar , const std::string & name , double val );
200 virtual bool SetVariableValue(unsigned int ivar , double value);
201 /// set the values of all existing variables (array must be dimensioned to the size of the existing parameters)
202 virtual bool SetVariableValues(const double * x) {
203 bool ret = true;
204 unsigned int i = 0;
205 while ( i <= NDim() && ret) {
206 ret &= SetVariableValue(i,x[i] ); i++;
207 }
208 return ret;
209 }
210 virtual bool SetVariableStepSize(unsigned int ivar, double value );
211 virtual bool SetVariableLowerLimit(unsigned int ivar, double lower);
212 virtual bool SetVariableUpperLimit(unsigned int ivar, double upper);
213 /// set the limits of an already existing variable
214 virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper) {
215 return SetVariableLowerLimit(ivar,lower) && SetVariableUpperLimit(ivar,upper);
216 }
217 virtual bool FixVariable(unsigned int ivar);
218 virtual bool ReleaseVariable(unsigned int ivar);
219 virtual bool IsFixedVariable(unsigned int ivar) const;
220 virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings & pars) const;
221
222 /// set the initial range of an existing variable
223 virtual bool SetVariableInitialRange(unsigned int /* ivar */, double /* mininitial */, double /* maxinitial */) {
224 return false;
225 }
226
227 /// method to perform the minimization
228 virtual bool Minimize() = 0;
229
230 /// return minimum function value
231 virtual double MinValue() const = 0;
232
233 /// return pointer to X values at the minimum
234 virtual const double * X() const = 0;
235
236 /// return expected distance reached from the minimum (re-implement if minimizer provides it
237 virtual double Edm() const { return -1; }
238
239 /// return pointer to gradient values at the minimum
240 virtual const double * MinGradient() const { return nullptr; }
241
242 /// number of function calls to reach the minimum
243 virtual unsigned int NCalls() const { return 0; }
244
245 /// number of iterations to reach the minimum
246 virtual unsigned int NIterations() const { return NCalls(); }
247
248 /// this is <= Function().NDim() which is the total
249 /// number of variables (free+ constrained ones)
250 virtual unsigned int NDim() const = 0;
251
252 /// number of free variables (real dimension of the problem)
253 /// this is <= Function().NDim() which is the total
254 /// (re-implement if minimizer supports bounded parameters)
255 virtual unsigned int NFree() const { return NDim(); }
256
257 /// minimizer provides error and error matrix
258 virtual bool ProvidesError() const { return false; }
259
260 /// return errors at the minimum
261 virtual const double * Errors() const { return nullptr; }
262
263 virtual double CovMatrix(unsigned int ivar , unsigned int jvar ) const;
264 virtual bool GetCovMatrix(double * covMat) const;
265 virtual bool GetHessianMatrix(double * hMat) const;
266
267
268 ///return status of covariance matrix
269 /// using Minuit convention {0 not calculated 1 approximated 2 made pos def , 3 accurate}
270 /// Minimizer who implements covariance matrix calculation will re-implement the method
271 virtual int CovMatrixStatus() const {
272 return 0;
273 }
274
275 /**
276 return correlation coefficient between variable i and j.
277 If the variable is fixed or const the return value is zero
278 */
279 virtual double Correlation(unsigned int i, unsigned int j ) const {
280 double tmp = CovMatrix(i,i) * CovMatrix(j,j);
281 return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp );
282 }
283
284 virtual double GlobalCC(unsigned int ivar) const;
285
286 virtual bool GetMinosError(unsigned int ivar , double & errLow, double & errUp, int option = 0);
287 virtual bool Hesse();
288 virtual bool Scan(unsigned int ivar , unsigned int & nstep , double * x , double * y ,
289 double xmin = 0, double xmax = 0);
290 virtual bool Contour(unsigned int ivar , unsigned int jvar, unsigned int & npoints,
291 double * xi , double * xj );
292
293 /// return reference to the objective function
294 ///virtual const ROOT::Math::IGenFunction & Function() const = 0;
295
296 /// print the result according to set level (implemented for TMinuit for maintaining Minuit-style printing)
297 virtual void PrintResults() {}
298
299 virtual std::string VariableName(unsigned int ivar) const;
300
301 virtual int VariableIndex(const std::string & name) const;
302
303 /** minimizer configuration parameters **/
304
305 /// set print level
306 int PrintLevel() const { return fOptions.PrintLevel(); }
307
308 /// max number of function calls
309 unsigned int MaxFunctionCalls() const { return fOptions.MaxFunctionCalls(); }
310
311 /// max iterations
312 unsigned int MaxIterations() const { return fOptions.MaxIterations(); }
313
314 /// absolute tolerance
315 double Tolerance() const { return fOptions.Tolerance(); }
316
317 /// precision of minimizer in the evaluation of the objective function
318 /// ( a value <=0 corresponds to the let the minimizer choose its default one)
319 double Precision() const { return fOptions.Precision(); }
320
321 /// strategy
322 int Strategy() const { return fOptions.Strategy(); }
323
324 /// status code of minimizer
325 int Status() const { return fStatus; }
326
327 /// status code of Minos (to be re-implemented by the minimizers supporting Minos)
328 virtual int MinosStatus() const { return -1; }
329
330 /// return the statistical scale used for calculate the error
331 /// is typically 1 for Chi2 and 0.5 for likelihood minimization
332 double ErrorDef() const { return fOptions.ErrorDef(); }
333
334 ///return true if Minimizer has performed a detailed error validation (e.g. run Hesse for Minuit)
335 bool IsValidError() const { return fValidError; }
336
337 /// retrieve the minimizer options (implement derived class if needed)
338 virtual MinimizerOptions Options() const {
339 return fOptions;
340 }
341
342 /// set print level
343 void SetPrintLevel(int level) { fOptions.SetPrintLevel(level); }
344
345 ///set maximum of function calls
346 void SetMaxFunctionCalls(unsigned int maxfcn) { if (maxfcn > 0) fOptions.SetMaxFunctionCalls(maxfcn); }
347
348 /// set maximum iterations (one iteration can have many function calls)
349 void SetMaxIterations(unsigned int maxiter) { if (maxiter > 0) fOptions.SetMaxIterations(maxiter); }
350
351 /// set the tolerance
352 void SetTolerance(double tol) { fOptions.SetTolerance(tol); }
353
354 /// set in the minimizer the objective function evaluation precision
355 /// ( a value <=0 means the minimizer will choose its optimal value automatically, i.e. default case)
356 void SetPrecision(double prec) { fOptions.SetPrecision(prec); }
357
358 ///set the strategy
359 void SetStrategy(int strategyLevel) { fOptions.SetStrategy(strategyLevel); }
360
361 /// set scale for calculating the errors
362 void SetErrorDef(double up) { fOptions.SetErrorDef(up); }
363
364 /// flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit)
365 void SetValidError(bool on) { fValidError = on; }
366
367 /// set all options in one go
368 void SetOptions(const MinimizerOptions & opt) {
369 fOptions = opt;
370 }
371
372 /// set only the extra options
373 void SetExtraOptions(const IOptions & extraOptions) { fOptions.SetExtraOptions(extraOptions); }
374
375 /// reset the default options (defined in MinimizerOptions)
378 }
379
380protected:
381
382
383//private:
384
385
386 // keep protected to be accessible by the derived classes
387
388
389 bool fValidError; ///< flag to control if errors have been validated (Hesse has been run in case of Minuit)
390 MinimizerOptions fOptions; ///< minimizer options
391 int fStatus; ///< status of minimizer
392};
393
394 } // end namespace Math
395
396} // end namespace ROOT
397
398
399#endif /* ROOT_Math_Minimizer */
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char name[80]
Definition TGX11.cxx:110
float xmin
float xmax
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
Documentation for the abstract class IBaseFunctionMultiDim.
Definition IFunction.h:61
Generic interface for defining configuration options of a numerical algorithm.
Definition IOptions.h:28
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
void SetStrategy(int stra)
set the strategy
void SetMaxIterations(unsigned int maxiter)
set maximum iterations (one iteration can have many function calls)
double Tolerance() const
absolute tolerance
double Precision() const
precision in the objective function calculation (value <=0 means left to default)
double ErrorDef() const
error definition
void SetExtraOptions(const IOptions &opt)
set extra options (in this case pointer is cloned)
unsigned int MaxIterations() const
max iterations
void SetPrecision(double prec)
set the precision
unsigned int MaxFunctionCalls() const
max number of function calls
void ResetToDefaultOptions()
non-static methods for setting options
int PrintLevel() const
non-static methods for retrieving options
void SetErrorDef(double err)
set error def
void SetPrintLevel(int level)
set print level
void SetTolerance(double tol)
set the tolerance
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
Definition Minimizer.h:117
virtual bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower, double upper)
set a new upper/lower limited variable (override if minimizer supports them ) otherwise as default se...
Definition Minimizer.cxx:15
double Tolerance() const
absolute tolerance
Definition Minimizer.h:315
virtual const double * Errors() const
return errors at the minimum
Definition Minimizer.h:261
virtual int VariableIndex(const std::string &name) const
get index of variable given a variable given a name return -1 if variable is not found
unsigned int MaxFunctionCalls() const
max number of function calls
Definition Minimizer.h:309
virtual bool GetCovMatrix(double *covMat) const
Fill the passed array with the covariance matrix elements if the variable is fixed or const the value...
virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower)
set a new lower limit variable (override if minimizer supports them )
Definition Minimizer.h:190
virtual bool SetVariableStepSize(unsigned int ivar, double value)
set the step size of an already existing variable
Definition Minimizer.cxx:43
double Precision() const
precision of minimizer in the evaluation of the objective function ( a value <=0 corresponds to the l...
Definition Minimizer.h:319
virtual const double * X() const =0
return pointer to X values at the minimum
virtual unsigned int NIterations() const
number of iterations to reach the minimum
Definition Minimizer.h:246
void SetMaxIterations(unsigned int maxiter)
set maximum iterations (one iteration can have many function calls)
Definition Minimizer.h:349
virtual bool SetVariableInitialRange(unsigned int, double, double)
set the initial range of an existing variable
Definition Minimizer.h:223
void SetErrorDef(double up)
set scale for calculating the errors
Definition Minimizer.h:362
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &pars) const
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
Definition Minimizer.cxx:90
void SetValidError(bool on)
flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit)
Definition Minimizer.h:365
int SetVariables(const VariableIterator &begin, const VariableIterator &end)
Definition Minimizer.h:166
virtual double GlobalCC(unsigned int ivar) const
return global correlation coefficient for variable i This is a number between zero and one which give...
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
Definition Minimizer.h:240
int fStatus
status of minimizer
Definition Minimizer.h:391
virtual bool SetVariableValue(unsigned int ivar, double value)
set the value of an already existing variable
Definition Minimizer.cxx:34
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)=0
set the function to minimize
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.
unsigned int MaxIterations() const
max iterations
Definition Minimizer.h:312
void SetDefaultOptions()
reset the default options (defined in MinimizerOptions)
Definition Minimizer.h:376
bool fValidError
flag to control if errors have been validated (Hesse has been run in case of Minuit)
Definition Minimizer.h:389
virtual int MinosStatus() const
status code of Minos (to be re-implemented by the minimizers supporting Minos)
Definition Minimizer.h:328
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
set the limits of an already existing variable
Definition Minimizer.h:214
void SetTolerance(double tol)
set the tolerance
Definition Minimizer.h:352
virtual int CovMatrixStatus() const
return status of covariance matrix using Minuit convention {0 not calculated 1 approximated 2 made po...
Definition Minimizer.h:271
virtual bool Minimize()=0
method to perform the minimization
int Status() const
status code of minimizer
Definition Minimizer.h:325
Minimizer(const Minimizer &)
Copy constructor.
Definition Minimizer.h:143
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper)
set the upper-limit of an already existing variable
Definition Minimizer.cxx:59
Minimizer()
Default constructor.
Definition Minimizer.h:124
virtual std::string VariableName(unsigned int ivar) const
get name of variables (override if minimizer support storing of variable names) return an empty strin...
void SetPrintLevel(int level)
set print level
Definition Minimizer.h:343
virtual double CovMatrix(unsigned int ivar, unsigned int jvar) const
return covariance matrices element for variables ivar,jvar if the variable is fixed the return value ...
virtual bool GetHessianMatrix(double *hMat) const
Fill the passed array with the Hessian matrix elements The Hessian matrix is the matrix of the second...
int Strategy() const
strategy
Definition Minimizer.h:322
virtual unsigned int NCalls() const
number of function calls to reach the minimum
Definition Minimizer.h:243
virtual bool SetUpperLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double upper)
set a new upper limit variable (override if minimizer supports them )
Definition Minimizer.h:194
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)=0
set a new free variable
void SetStrategy(int strategyLevel)
set the strategy
Definition Minimizer.h:359
virtual bool ProvidesError() const
minimizer provides error and error matrix
Definition Minimizer.h:258
Minimizer & operator=(const Minimizer &rhs)
Assignment operator.
Definition Minimizer.h:148
virtual bool FixVariable(unsigned int ivar)
fix an existing variable
Definition Minimizer.cxx:68
void SetPrecision(double prec)
set in the minimizer the objective function evaluation precision ( a value <=0 means the minimizer wi...
Definition Minimizer.h:356
virtual MinimizerOptions Options() const
retrieve the minimizer options (implement derived class if needed)
Definition Minimizer.h:338
virtual double Correlation(unsigned int i, unsigned int j) const
return correlation coefficient between variable i and j.
Definition Minimizer.h:279
virtual ~Minimizer()
Destructor (no operations)
Definition Minimizer.h:132
double ErrorDef() const
return the statistical scale used for calculate the error is typically 1 for Chi2 and 0....
Definition Minimizer.h:332
MinimizerOptions fOptions
minimizer options
Definition Minimizer.h:390
virtual bool SetFixedVariable(unsigned int ivar, const std::string &name, double val)
set a new fixed variable (override if minimizer supports them )
Definition Minimizer.cxx:25
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
Definition Minimizer.h:346
bool IsValidError() const
return true if Minimizer has performed a detailed error validation (e.g. run Hesse for Minuit)
Definition Minimizer.h:335
virtual double Edm() const
return expected distance reached from the minimum (re-implement if minimizer provides it
Definition Minimizer.h:237
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 err...
void SetOptions(const MinimizerOptions &opt)
set all options in one go
Definition Minimizer.h:368
virtual void SetHessianFunction(std::function< bool(const std::vector< double > &, double *)>)
set the function implementing Hessian computation (re-implemented by Minimizer using it)
Definition Minimizer.h:162
virtual bool SetVariableValues(const double *x)
set the values of all existing variables (array must be dimensioned to the size of the existing param...
Definition Minimizer.h:202
virtual void Clear()
reset for consecutive minimization - implement if needed
Definition Minimizer.h:156
void SetExtraOptions(const IOptions &extraOptions)
set only the extra options
Definition Minimizer.h:373
virtual double MinValue() const =0
return minimum function value
int PrintLevel() const
minimizer configuration parameters
Definition Minimizer.h:306
virtual void PrintResults()
return reference to the objective function virtual const ROOT::Math::IGenFunction & Function() const ...
Definition Minimizer.h:297
virtual unsigned int NDim() const =0
this is <= Function().NDim() which is the total number of variables (free+ constrained ones)
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
Definition Minimizer.h:255
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower)
set the lower-limit of an already existing variable
Definition Minimizer.cxx:51
virtual bool IsFixedVariable(unsigned int ivar) const
query if an existing variable is fixed (i.e.
Definition Minimizer.cxx:83
virtual bool ReleaseVariable(unsigned int ivar)
release an existing variable
Definition Minimizer.cxx:75
virtual bool Hesse()
perform a full calculation of the Hessian matrix for error calculation
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 The c...
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition HFitImpl.cxx:133
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...