Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
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 <ROOT/RSpan.hxx>
20
21#include <string>
22#include <limits>
23#include <cmath>
24#include <vector>
25#include <functional>
26
27
28
29namespace ROOT {
30
31 namespace Fit {
32 class ParameterSettings;
33 }
34
35
36 namespace Math {
37
38/**
39 @defgroup MultiMin Multi-dimensional Minimization
40 @ingroup NumAlgo
41
42 Classes implementing algorithms for multi-dimensional minimization
43 */
44
45
46
47//_______________________________________________________________________________
48/**
49 Abstract Minimizer class, defining the interface for the various minimizer
50 (like Minuit2, Minuit, GSL, etc..) in ROOT.
51 Plug-in's exist in ROOT to be able to instantiate the derived classes without linking the library
52 using the static function ROOT::Math::Factory::CreateMinimizer.
53
54 Here is the list of all possible minimizers and their respective methods (algorithms) that can be instantiated:
55 The name shown below can be used to create them. More documentation can be found in the respective class
56
57 - Minuit (class TMinuitMinimizer)
58 - Migrad (default)
59 - 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))
60 - Simplex
61 - Minimize (a combination of Simplex + Migrad)
62 - Minimize
63 - Scan
64 - Seek
65
66 - Minuit2 (class ROOT::Minuit2::Minuit2Minimizer)
67 - Migrad (default)
68 - Simplex
69 - Minimize
70 - Fumili (Fumili2)
71 - Scan
72
73 - Fumili (class TFumiliMinimizer)
74
75 - Linear (see TLinearFitter and TLinearMinimizer) minimizer (fitter) working only for linear functions
76
77 - GSLMultiMin (class ROOT::Math::GSLMinimizer) available when ROOT is built with `mathmore` support
78 - BFGS2 (Default)
79 - BFGS
80 - ConjugateFR
81 - ConjugatePR
82 - SteepestDescent
83
84 - GSLMultiFit (class ROOT::Math::GSLNLMinimizer) available when ROOT is built `mathmore` support
85
86 - GSLSimAn (class ROOT::Math::GSLSimAnMinimizer) available when ROOT is built with `mathmore` support
87
88 - Genetic (class ROOT::Math::GeneticMinimizer)
89
90 - RMinimizer (class ROOT::Math::RMinimizer) available when ROOT is built with `r` support
91 - BFGS (default)
92 - L-BFGS-S
93 - Nelder-Mead
94 - CG
95 - 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)
96
97
98 The Minimizer class provides the interface to perform the minimization including
99
100
101 In addition to provide the API for function minimization (via ROOT::Math::Minimizer::Minimize) the Minimizer class provides:
102 - the interface for setting the function to be minimized. The objective function passed to the Minimizer must implement the multi-dimensional generic interface
103 ROOT::Math::IBaseFunctionMultiDim. If the function provides gradient calculation (e.g. implementing the ROOT::Math::IGradientFunctionMultiDim interface)
104 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.
105 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
106 specialized method for least-square and also likelihood minimizations. They require then that the given function implements in addition
107 the `ROOT::Math::FitMethodFunction` interface.
108 - The interface for setting the initial values for the function variables (which are the parameters in
109 of the model function in case of solving for fitting) and specifying their limits.
110 - The interface to set and retrieve basic minimization parameters. These parameter are controlled by the class `ROOT::Math::MinimizerOptions`.
111 When no parameters are specified the default ones are used. Specific Minimizer options can also be passed via the `MinimizerOptions` class.
112 For the list of the available option parameter one must look at the documentation of the corresponding derived class.
113 - The interface to retrieve the result of minimization ( minimum X values, function value, gradient, error on the minimum, etc...)
114 - The interface to perform a Scan, Hesse or a Contour plot (for the minimizers that support this, i.e. Minuit and Minuit2)
115
116 An example on how to use this interface is the tutorial NumericalMinimization.C in the tutorials/math directory.
117
118 @ingroup MultiMin
119*/
120
122
123public:
124
125 /// Default constructor.
127
128 /// Destructor (no operations).
129 virtual ~Minimizer () {}
130
131 // usually copying is non trivial, so we delete this
132 Minimizer(Minimizer const&) = delete;
133 Minimizer &operator=(Minimizer const&) = delete;
134 Minimizer(Minimizer &&) = delete;
136
137 /// Reset for consecutive minimization - implement if needed.
138 virtual void Clear() {}
139
140 /// Set the function to minimize.
141 virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func) = 0;
142
143 /// Set the function implementing Hessian computation (re-implemented by Minimizer using it).
144 virtual void SetHessianFunction(std::function<bool(std::span<const double>, double *)> ) {}
145
146 /// Add variables. @return number of variables successfully added
147 template<class VariableIterator>
148 int SetVariables(const VariableIterator & begin, const VariableIterator & end) {
149 unsigned int ivar = 0;
150 for ( VariableIterator vitr = begin; vitr != end; ++vitr) {
151 bool iret = false;
152 if (vitr->IsFixed() )
153 iret = SetFixedVariable(ivar, vitr->Name(), vitr->Value() );
154 else if (vitr->IsDoubleBound() )
155 iret = SetLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit(), vitr->UpperLimit() );
156 else if (vitr->HasLowerLimit() )
157 iret = SetLowerLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit() );
158 else if (vitr->HasUpperLimit() )
159 iret = SetUpperLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->UpperLimit() );
160 else
161 iret = SetVariable( ivar, vitr->Name(), vitr->Value(), vitr->StepSize() );
162
163 if (iret) ivar++;
164
165 // an error message should be eventually be reported in the virtual single SetVariable methods
166 }
167 return ivar;
168 }
169 /// Set a new free variable.
170 virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step) = 0;
171 /// Set initial second derivatives.
172 virtual bool SetCovarianceDiag(std::span<const double> d2, unsigned int n);
173 /// Set initial covariance matrix.
174 virtual bool SetCovariance(std::span<const double> cov, unsigned int nrow);
175
176 /// Set a new lower limit variable (override if minimizer supports them), leave upper bound unlimited.
177 /// @see Minimizer::SetLimitedVariable
178 /// @param ivar the index of this variable in the array
179 /// @param name the variable name
180 /// @param val the value
181 /// @param step the step size
182 /// @param lower the lower bound
183 virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string & name, double val, double step, double lower) {
184 return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_limits<double>::infinity());
185 }
186 /// Set a new upper limit variable (override if minimizer supports them), leave lower bound unlimited.
187 /// @see Minimizer::SetLimitedVariable
188 /// @param ivar the index of this variable in the array
189 /// @param name the variable name
190 /// @param val the value
191 /// @param step the step size
192 /// @param upper the upper bound
193 virtual bool SetUpperLimitedVariable(unsigned int ivar, const std::string & name, double val, double step, double upper) {
194 return SetLimitedVariable(ivar, name, val, step, - std::numeric_limits<double>::infinity(), upper);
195 }
196 virtual bool SetLimitedVariable(unsigned int ivar, const std::string & name, double val, double step,
197 double lower, double upper);
198 virtual bool SetFixedVariable(unsigned int ivar, const std::string & name, double val);
199 virtual bool SetVariableValue(unsigned int ivar, double value);
200 /// Set the values of all existing variables (array must be dimensioned to the size of the existing parameters).
201 virtual bool SetVariableValues(const double * x) {
202 bool ret = true;
203 unsigned int i = 0;
204 while ( i <= NDim() && ret) {
205 ret &= SetVariableValue(i,x[i] ); i++;
206 }
207 return ret;
208 }
209 virtual bool SetVariableStepSize(unsigned int ivar, double value);
210 virtual bool SetVariableLowerLimit(unsigned int ivar, double lower);
211 virtual bool SetVariableUpperLimit(unsigned int ivar, double upper);
212 /// Set the limits of an already existing variable.
213 virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper) {
215 }
216 virtual bool FixVariable(unsigned int ivar);
217 virtual bool ReleaseVariable(unsigned int ivar);
218 virtual bool IsFixedVariable(unsigned int ivar) const;
219 virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings & pars) const;
220
221 /// Set the initial range of an existing variable.
222 virtual bool SetVariableInitialRange(unsigned int /* ivar */, double /* mininitial */, double /* maxinitial */) {
223 return false;
224 }
225
226 /// Method to perform the minimization.
227 virtual bool Minimize() = 0;
228
229 /// @return minimum function value
230 virtual double MinValue() const = 0;
231
232 /// @return pointer to X values at the minimum
233 virtual const double * X() const = 0;
234
235 /// @return expected distance reached from the minimum (re-implement if minimizer provides it
236 virtual double Edm() const { return -1; }
237
238 /// @return pointer to gradient values at the minimum
239 virtual const double * MinGradient() const { return nullptr; }
240
241 /// Number of function calls to reach the minimum.
242 virtual unsigned int NCalls() const { return 0; }
243
244 /// Number of iterations to reach the minimum.
245 virtual unsigned int NIterations() const { return NCalls(); }
246
247 /// this is <= Function().NDim() which is the total
248 /// number of variables (free+ constrained ones)
249 virtual unsigned int NDim() const = 0;
250
251 /// Number of free variables (real dimension of the problem).
252 /// this is <= Function().NDim() which is the total
253 /// (re-implement if minimizer supports bounded parameters)
254 virtual unsigned int NFree() const { return NDim(); }
255
256 /// Minimizer provides error and error matrix.
257 virtual bool ProvidesError() const { return false; }
258
259 /// @return errors at the minimum
260 virtual const double * Errors() const { return nullptr; }
261
262 virtual double CovMatrix(unsigned int ivar , unsigned int jvar ) const;
263 virtual bool GetCovMatrix(double * covMat) const;
264 virtual bool GetHessianMatrix(double * hMat) const;
265
266
267 /// @return status of covariance matrix
268 /// using Minuit convention {0 not calculated 1 approximated 2 made pos def , 3 accurate}
269 /// Minimizer who implements covariance matrix calculation will re-implement the method
270 virtual int CovMatrixStatus() const {
271 return 0;
272 }
273
274 /**
275 * @return correlation coefficient between variable i and j.
276 * If the variable is fixed or const the return value is zero
277 */
278 virtual double Correlation(unsigned int i, unsigned int j ) const {
279 double tmp = CovMatrix(i,i) * CovMatrix(j,j);
280 return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp );
281 }
282
283 virtual double GlobalCC(unsigned int ivar) const;
284
285 virtual bool GetMinosError(unsigned int ivar , double & errLow, double & errUp, int option = 0);
286 virtual bool Hesse();
287 virtual bool Scan(unsigned int ivar , unsigned int & nstep , double * x , double * y ,
288 double xmin = 0, double xmax = 0);
289 virtual bool Contour(unsigned int ivar , unsigned int jvar, unsigned int & npoints,
290 double * xi , double * xj );
291
292 /// @return reference to the objective function
293 /// virtual const ROOT::Math::IGenFunction & Function() const = 0;
294
295 /// Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printing).
296 virtual void PrintResults() {}
297
298 virtual std::string VariableName(unsigned int ivar) const;
299
300 virtual int VariableIndex(const std::string & name) const;
301
302 /* minimizer configuration parameters */
303
304 /// Set print level.
305 int PrintLevel() const { return fOptions.PrintLevel(); }
306
307 /// Max number of function calls.
308 unsigned int MaxFunctionCalls() const { return fOptions.MaxFunctionCalls(); }
309
310 /// Max iterations.
311 unsigned int MaxIterations() const { return fOptions.MaxIterations(); }
312
313 /// Absolute tolerance.
314 double Tolerance() const { return fOptions.Tolerance(); }
315
316 /// Precision of minimizer in the evaluation of the objective function.
317 /// (a value <=0 corresponds to the let the minimizer choose its default one)
318 double Precision() const { return fOptions.Precision(); }
319
320 /// Strategy.
321 int Strategy() const { return fOptions.Strategy(); }
322
323 /// Status code of minimizer.
324 int Status() const { return fStatus; }
325
326 /// Status code of Minos (to be re-implemented by the minimizers supporting Minos).
327 virtual int MinosStatus() const { return -1; }
328
329 /// @return the statistical scale used for calculate the error
330 /// is typically 1 for Chi2 and 0.5 for likelihood minimization
331 double ErrorDef() const { return fOptions.ErrorDef(); }
332
333 /// @return true if Minimizer has performed a detailed error validation (e.g. run Hesse for Minuit)
334 bool IsValidError() const { return fValidError; }
335
336 /// Retrieve the minimizer options (implement derived class if needed).
337 virtual MinimizerOptions Options() const {
338 return fOptions;
339 }
340
341 /// Set print level.
342 void SetPrintLevel(int level) { fOptions.SetPrintLevel(level); }
343
344 /// Set maximum of function calls.
346
347 /// Set maximum iterations (one iteration can have many function calls).
349
350 /// Set the tolerance.
352
353 /// Set in the minimizer the objective function evaluation precision.
354 /// (a value <=0 means the minimizer will choose its optimal value automatically, i.e. default case)
356
357 /// Set the strategy.
359
360 /// Set scale for calculating the errors.
362
363 /// Flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit).
364 void SetValidError(bool on) { fValidError = on; }
365
366 /// Set all options in one go.
367 void SetOptions(const MinimizerOptions & opt) {
368 fOptions = opt;
369 }
370
371 /// Set only the extra options.
373
374 /// Reset the default options (defined in MinimizerOptions).
378
379protected:
380
381 // keep protected to be accessible by the derived classes
382
383 bool fValidError = false; ///< flag to control if errors have been validated (Hesse has been run in case of Minuit)
384 MinimizerOptions fOptions; ///< minimizer options
385 int fStatus = -1; ///< status of minimizer
386};
387
388 } // end namespace Math
389
390} // end namespace ROOT
391
392
393#endif /* ROOT_Math_Minimizer */
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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:63
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:121
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 set...
Definition Minimizer.cxx:42
double Tolerance() const
Absolute tolerance.
Definition Minimizer.h:314
virtual const double * Errors() const
Definition Minimizer.h:260
virtual int VariableIndex(const std::string &name) const
Get index of variable given a variable given a name.
unsigned int MaxFunctionCalls() const
Max number of function calls.
Definition Minimizer.h:308
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), leave upper bound unlimited.
Definition Minimizer.h:183
virtual bool SetVariableStepSize(unsigned int ivar, double value)
Set the step size of an already existing variable.
Definition Minimizer.cxx:70
double Precision() const
Precision of minimizer in the evaluation of the objective function.
Definition Minimizer.h:318
virtual void SetHessianFunction(std::function< bool(std::span< const double >, double *)>)
Set the function implementing Hessian computation (re-implemented by Minimizer using it).
Definition Minimizer.h:144
virtual bool SetCovarianceDiag(std::span< const double > d2, unsigned int n)
Set initial second derivatives.
Definition Minimizer.cxx:15
virtual const double * X() const =0
virtual unsigned int NIterations() const
Number of iterations to reach the minimum.
Definition Minimizer.h:245
void SetMaxIterations(unsigned int maxiter)
Set maximum iterations (one iteration can have many function calls).
Definition Minimizer.h:348
virtual bool SetVariableInitialRange(unsigned int, double, double)
Set the initial range of an existing variable.
Definition Minimizer.h:222
void SetErrorDef(double up)
Set scale for calculating the errors.
Definition Minimizer.h:361
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &pars) const
Get variable settings in a variable object (like ROOT::Fit::ParamsSettings).
void SetValidError(bool on)
Flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit).
Definition Minimizer.h:364
int SetVariables(const VariableIterator &begin, const VariableIterator &end)
Add variables.
Definition Minimizer.h:148
virtual double GlobalCC(unsigned int ivar) const
virtual const double * MinGradient() const
Definition Minimizer.h:239
Minimizer(Minimizer &&)=delete
int fStatus
status of minimizer
Definition Minimizer.h:385
virtual bool SetVariableValue(unsigned int ivar, double value)
Set the value of an already existing variable.
Definition Minimizer.cxx:61
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:311
void SetDefaultOptions()
Reset the default options (defined in MinimizerOptions).
Definition Minimizer.h:375
bool fValidError
flag to control if errors have been validated (Hesse has been run in case of Minuit)
Definition Minimizer.h:383
virtual int MinosStatus() const
Status code of Minos (to be re-implemented by the minimizers supporting Minos).
Definition Minimizer.h:327
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
Set the limits of an already existing variable.
Definition Minimizer.h:213
void SetTolerance(double tol)
Set the tolerance.
Definition Minimizer.h:351
Minimizer(Minimizer const &)=delete
virtual int CovMatrixStatus() const
Definition Minimizer.h:270
virtual bool Minimize()=0
Method to perform the minimization.
int Status() const
Status code of minimizer.
Definition Minimizer.h:324
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper)
Set the upper-limit of an already existing variable.
Definition Minimizer.cxx:86
virtual bool SetCovariance(std::span< const double > cov, unsigned int nrow)
Set initial covariance matrix.
Definition Minimizer.cxx:26
Minimizer()
Default constructor.
Definition Minimizer.h:126
virtual std::string VariableName(unsigned int ivar) const
Get name of variables (override if minimizer support storing of variable names).
void SetPrintLevel(int level)
Set print level.
Definition Minimizer.h:342
virtual double CovMatrix(unsigned int ivar, unsigned int jvar) const
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:321
virtual unsigned int NCalls() const
Number of function calls to reach the minimum.
Definition Minimizer.h:242
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), leave lower bound unlimited.
Definition Minimizer.h:193
Minimizer & operator=(Minimizer &&)=delete
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:358
virtual bool ProvidesError() const
Minimizer provides error and error matrix.
Definition Minimizer.h:257
virtual bool FixVariable(unsigned int ivar)
Fix an existing variable.
Definition Minimizer.cxx:95
void SetPrecision(double prec)
Set in the minimizer the objective function evaluation precision.
Definition Minimizer.h:355
virtual MinimizerOptions Options() const
Retrieve the minimizer options (implement derived class if needed).
Definition Minimizer.h:337
virtual double Correlation(unsigned int i, unsigned int j) const
Definition Minimizer.h:278
virtual ~Minimizer()
Destructor (no operations).
Definition Minimizer.h:129
double ErrorDef() const
Definition Minimizer.h:331
MinimizerOptions fOptions
minimizer options
Definition Minimizer.h:384
Minimizer & operator=(Minimizer const &)=delete
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:52
void SetMaxFunctionCalls(unsigned int maxfcn)
Set maximum of function calls.
Definition Minimizer.h:345
bool IsValidError() const
Definition Minimizer.h:334
virtual double Edm() const
Definition Minimizer.h:236
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:367
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:201
virtual void Clear()
Reset for consecutive minimization - implement if needed.
Definition Minimizer.h:138
void SetExtraOptions(const IOptions &extraOptions)
Set only the extra options.
Definition Minimizer.h:372
virtual double MinValue() const =0
int PrintLevel() const
Set print level.
Definition Minimizer.h:305
virtual void PrintResults()
Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printin...
Definition Minimizer.h:296
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).
Definition Minimizer.h:254
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower)
Set the lower-limit of an already existing variable.
Definition Minimizer.cxx:78
virtual bool IsFixedVariable(unsigned int ivar) const
Query if an existing variable is fixed (i.e.
virtual bool ReleaseVariable(unsigned int ivar)
Release an existing variable.
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.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
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...