Logo ROOT  
Reference Guide
 
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 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/math directory.
113
114 To get an overview of the default minimizer, tolerance, precision, maximum number of function calls, etc., use:
115 `ROOT::Math::MinimizerOptions::PrintDefault()`
116
117 @ingroup MultiMin
118*/
119
121
122public:
123
124 /// Default constructor.
126
127 /// Destructor (no operations).
128 virtual ~Minimizer () {}
129
130 // usually copying is non trivial, so we delete this
131 Minimizer(Minimizer const&) = delete;
132 Minimizer &operator=(Minimizer const&) = delete;
133 Minimizer(Minimizer &&) = delete;
135
136 /// Reset for consecutive minimization - implement if needed.
137 virtual void Clear() {}
138
139 /// Set the function to minimize.
140 virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func) = 0;
141
142 /// Set the function implementing Hessian computation (re-implemented by Minimizer using it).
143 virtual void SetHessianFunction(std::function<bool(std::span<const double>, double *)> ) {}
144
145 /// Add variables. @return number of variables successfully added
146 template<class VariableIterator>
147 int SetVariables(const VariableIterator & begin, const VariableIterator & end) {
148 unsigned int ivar = 0;
149 for ( VariableIterator vitr = begin; vitr != end; ++vitr) {
150 bool iret = false;
151 if (vitr->IsFixed() )
152 iret = SetFixedVariable(ivar, vitr->Name(), vitr->Value() );
153 else if (vitr->IsDoubleBound() )
154 iret = SetLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit(), vitr->UpperLimit() );
155 else if (vitr->HasLowerLimit() )
156 iret = SetLowerLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->LowerLimit() );
157 else if (vitr->HasUpperLimit() )
158 iret = SetUpperLimitedVariable(ivar, vitr->Name(), vitr->Value(), vitr->StepSize(), vitr->UpperLimit() );
159 else
160 iret = SetVariable( ivar, vitr->Name(), vitr->Value(), vitr->StepSize() );
161
162 if (iret) ivar++;
163
164 // an error message should be eventually be reported in the virtual single SetVariable methods
165 }
166 return ivar;
167 }
168 /// Set a new free variable.
169 virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step) = 0;
170 /// Set initial second derivatives.
171 virtual bool SetCovarianceDiag(std::span<const double> d2, unsigned int n);
172 /// Set initial covariance matrix.
173 virtual bool SetCovariance(std::span<const double> cov, unsigned int nrow);
174
175 /// Set a new lower limit variable (override if minimizer supports them), leave upper bound unlimited.
176 /// @see Minimizer::SetLimitedVariable
177 /// @param ivar the index of this variable in the array
178 /// @param name the variable name
179 /// @param val the value
180 /// @param step the step size
181 /// @param lower the lower bound
182 virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string & name, double val, double step, double lower) {
183 return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_limits<double>::infinity());
184 }
185 /// Set a new upper limit variable (override if minimizer supports them), leave lower bound unlimited.
186 /// @see Minimizer::SetLimitedVariable
187 /// @param ivar the index of this variable in the array
188 /// @param name the variable name
189 /// @param val the value
190 /// @param step the step size
191 /// @param upper the upper bound
192 virtual bool SetUpperLimitedVariable(unsigned int ivar, const std::string & name, double val, double step, double upper) {
193 return SetLimitedVariable(ivar, name, val, step, - std::numeric_limits<double>::infinity(), upper);
194 }
195 virtual bool SetLimitedVariable(unsigned int ivar, const std::string & name, double val, double step,
196 double lower, double upper);
197 virtual bool SetFixedVariable(unsigned int ivar, const std::string & name, double val);
198 virtual bool SetVariableValue(unsigned int ivar, double value);
199 /// Set the values of all existing variables (array must be dimensioned to the size of the existing parameters).
200 virtual bool SetVariableValues(const double * x) {
201 bool ret = true;
202 unsigned int i = 0;
203 while ( i <= NDim() && ret) {
204 ret &= SetVariableValue(i,x[i] ); i++;
205 }
206 return ret;
207 }
208 virtual bool SetVariableStepSize(unsigned int ivar, double value);
209 virtual bool SetVariableLowerLimit(unsigned int ivar, double lower);
210 virtual bool SetVariableUpperLimit(unsigned int ivar, double upper);
211 /// Set the limits of an already existing variable.
212 virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper) {
214 }
215 virtual bool FixVariable(unsigned int ivar);
216 virtual bool ReleaseVariable(unsigned int ivar);
217 virtual bool IsFixedVariable(unsigned int ivar) const;
218 virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings & pars) const;
219
220 /// Set the initial range of an existing variable.
221 virtual bool SetVariableInitialRange(unsigned int /* ivar */, double /* mininitial */, double /* maxinitial */) {
222 return false;
223 }
224
225 /// Method to perform the minimization.
226 virtual bool Minimize() = 0;
227
228 /// @return minimum function value
229 virtual double MinValue() const = 0;
230
231 /// @return pointer to X values at the minimum
232 virtual const double * X() const = 0;
233
234 /// @return expected distance reached from the minimum (re-implement if minimizer provides it
235 virtual double Edm() const { return -1; }
236
237 /// @return pointer to gradient values at the minimum
238 virtual const double * MinGradient() const { return nullptr; }
239
240 /// Number of function calls to reach the minimum.
241 virtual unsigned int NCalls() const { return 0; }
242
243 /// Number of iterations to reach the minimum.
244 virtual unsigned int NIterations() const { return NCalls(); }
245
246 /// this is <= Function().NDim() which is the total
247 /// number of variables (free+ constrained ones)
248 virtual unsigned int NDim() const = 0;
249
250 /// Number of free variables (real dimension of the problem).
251 /// this is <= Function().NDim() which is the total
252 /// (re-implement if minimizer supports bounded parameters)
253 virtual unsigned int NFree() const { return NDim(); }
254
255 /// Minimizer provides error and error matrix.
256 virtual bool ProvidesError() const { return false; }
257
258 /// @return errors at the minimum
259 virtual const double * Errors() const { return nullptr; }
260
261 virtual double CovMatrix(unsigned int ivar , unsigned int jvar ) const;
262 virtual bool GetCovMatrix(double * covMat) const;
263 virtual bool GetHessianMatrix(double * hMat) const;
264
265
266 /// @return status of covariance matrix
267 /// using Minuit convention {0 not calculated 1 approximated 2 made pos def , 3 accurate}
268 /// Minimizer who implements covariance matrix calculation will re-implement the method
269 virtual int CovMatrixStatus() const {
270 return 0;
271 }
272
273 /**
274 * @return correlation coefficient between variable i and j.
275 * If the variable is fixed or const the return value is zero
276 */
277 virtual double Correlation(unsigned int i, unsigned int j ) const {
278 double tmp = CovMatrix(i,i) * CovMatrix(j,j);
279 return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp );
280 }
281
282 virtual double GlobalCC(unsigned int ivar) const;
283
284 virtual bool GetMinosError(unsigned int ivar , double & errLow, double & errUp, int option = 0);
285 virtual bool Hesse();
286 virtual bool Scan(unsigned int ivar , unsigned int & nstep , double * x , double * y ,
287 double xmin = 0, double xmax = 0);
288 virtual bool Contour(unsigned int ivar , unsigned int jvar, unsigned int & npoints,
289 double * xi , double * xj );
290
291 /// @return reference to the objective function
292 /// virtual const ROOT::Math::IGenFunction & Function() const = 0;
293
294 /// Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printing).
295 virtual void PrintResults() {}
296
297 virtual std::string VariableName(unsigned int ivar) const;
298
299 virtual int VariableIndex(const std::string & name) const;
300
301 /* minimizer configuration parameters */
302
303 /// Set print level.
304 int PrintLevel() const { return fOptions.PrintLevel(); }
305
306 /// Max number of function calls.
307 unsigned int MaxFunctionCalls() const { return fOptions.MaxFunctionCalls(); }
308
309 /// Max iterations.
310 unsigned int MaxIterations() const { return fOptions.MaxIterations(); }
311
312 /// Absolute tolerance.
313 double Tolerance() const { return fOptions.Tolerance(); }
314
315 /// Precision of minimizer in the evaluation of the objective function.
316 /// (a value <=0 corresponds to the let the minimizer choose its default one)
317 double Precision() const { return fOptions.Precision(); }
318
319 /// Strategy.
320 int Strategy() const { return fOptions.Strategy(); }
321
322 /// Status code of minimizer.
323 int Status() const { return fStatus; }
324
325 /// Status code of Minos (to be re-implemented by the minimizers supporting Minos).
326 virtual int MinosStatus() const { return -1; }
327
328 /// @return the statistical scale used for calculate the error
329 /// is typically 1 for Chi2 and 0.5 for likelihood minimization
330 double ErrorDef() const { return fOptions.ErrorDef(); }
331
332 /// @return true if Minimizer has performed a detailed error validation (e.g. run Hesse for Minuit)
333 bool IsValidError() const { return fValidError; }
334
335 /// Retrieve the minimizer options (implement derived class if needed).
336 virtual MinimizerOptions Options() const {
337 return fOptions;
338 }
339
340 /// Set print level.
341 void SetPrintLevel(int level) { fOptions.SetPrintLevel(level); }
342
343 /// Set maximum of function calls.
345
346 /// Set maximum iterations (one iteration can have many function calls).
348
349 /// Set the tolerance.
351
352 /// Set in the minimizer the objective function evaluation precision.
353 /// (a value <=0 means the minimizer will choose its optimal value automatically, i.e. default case)
355
356 /// Set the strategy.
358
359 /// Set scale for calculating the errors.
361
362 /// Flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit).
363 void SetValidError(bool on) { fValidError = on; }
364
365 /// Set all options in one go.
366 void SetOptions(const MinimizerOptions & opt) {
367 fOptions = opt;
368 }
369
370 /// Set only the extra options.
372
373 /// Reset the default options (defined in MinimizerOptions).
377
378protected:
379
380 // keep protected to be accessible by the derived classes
381
382 bool fValidError = false; ///< flag to control if errors have been validated (Hesse has been run in case of Minuit)
383 MinimizerOptions fOptions; ///< minimizer options
384 int fStatus = -1; ///< status of minimizer
385};
386
387 } // end namespace Math
388
389} // end namespace ROOT
390
391
392#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:120
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:313
virtual const double * Errors() const
Definition Minimizer.h:259
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:307
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:182
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:317
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:143
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:244
void SetMaxIterations(unsigned int maxiter)
Set maximum iterations (one iteration can have many function calls).
Definition Minimizer.h:347
virtual bool SetVariableInitialRange(unsigned int, double, double)
Set the initial range of an existing variable.
Definition Minimizer.h:221
void SetErrorDef(double up)
Set scale for calculating the errors.
Definition Minimizer.h:360
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:363
int SetVariables(const VariableIterator &begin, const VariableIterator &end)
Add variables.
Definition Minimizer.h:147
virtual double GlobalCC(unsigned int ivar) const
virtual const double * MinGradient() const
Definition Minimizer.h:238
Minimizer(Minimizer &&)=delete
int fStatus
status of minimizer
Definition Minimizer.h:384
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:310
void SetDefaultOptions()
Reset the default options (defined in MinimizerOptions).
Definition Minimizer.h:374
bool fValidError
flag to control if errors have been validated (Hesse has been run in case of Minuit)
Definition Minimizer.h:382
virtual int MinosStatus() const
Status code of Minos (to be re-implemented by the minimizers supporting Minos).
Definition Minimizer.h:326
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
Set the limits of an already existing variable.
Definition Minimizer.h:212
void SetTolerance(double tol)
Set the tolerance.
Definition Minimizer.h:350
Minimizer(Minimizer const &)=delete
virtual int CovMatrixStatus() const
Definition Minimizer.h:269
virtual bool Minimize()=0
Method to perform the minimization.
int Status() const
Status code of minimizer.
Definition Minimizer.h:323
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:125
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:341
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:320
virtual unsigned int NCalls() const
Number of function calls to reach the minimum.
Definition Minimizer.h:241
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:192
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:357
virtual bool ProvidesError() const
Minimizer provides error and error matrix.
Definition Minimizer.h:256
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:354
virtual MinimizerOptions Options() const
Retrieve the minimizer options (implement derived class if needed).
Definition Minimizer.h:336
virtual double Correlation(unsigned int i, unsigned int j) const
Definition Minimizer.h:277
virtual ~Minimizer()
Destructor (no operations).
Definition Minimizer.h:128
double ErrorDef() const
Definition Minimizer.h:330
MinimizerOptions fOptions
minimizer options
Definition Minimizer.h:383
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:344
bool IsValidError() const
Definition Minimizer.h:333
virtual double Edm() const
Definition Minimizer.h:235
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:366
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:200
virtual void Clear()
Reset for consecutive minimization - implement if needed.
Definition Minimizer.h:137
void SetExtraOptions(const IOptions &extraOptions)
Set only the extra options.
Definition Minimizer.h:371
virtual double MinValue() const =0
int PrintLevel() const
Set print level.
Definition Minimizer.h:304
virtual void PrintResults()
Print the result according to set level (implemented for TMinuit for maintaining Minuit-style printin...
Definition Minimizer.h:295
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:253
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...