11 #ifndef ROOT_Math_MinimizerOptions
12 #define ROOT_Math_MinimizerOptions
32 class MinimizerOptions {
38 static void SetDefaultMinimizer(
const char * type,
const char * algo = 0);
39 static void SetDefaultErrorDef(
double up);
40 static void SetDefaultTolerance(
double tol);
41 static void SetDefaultPrecision(
double prec);
42 static void SetDefaultMaxFunctionCalls(
int maxcall);
43 static void SetDefaultMaxIterations(
int maxiter);
44 static void SetDefaultStrategy(
int strat);
45 static void SetDefaultPrintLevel(
int level);
46 static void SetDefaultExtraOptions(
const IOptions * extraoptions);
48 static const std::string & DefaultMinimizerType();
49 static const std::string & DefaultMinimizerAlgo();
50 static double DefaultErrorDef();
51 static double DefaultTolerance();
52 static double DefaultPrecision();
53 static int DefaultMaxFunctionCalls();
54 static int DefaultMaxIterations();
55 static int DefaultStrategy();
56 static int DefaultPrintLevel();
57 static IOptions * DefaultExtraOptions();
60 static ROOT::Math::IOptions & Default(
const char * name);
63 static ROOT::Math::IOptions * FindDefault(
const char * name);
66 static void PrintDefault(
const char * name, std::ostream & os = std::cout);
77 MinimizerOptions(
const MinimizerOptions & opt);
80 MinimizerOptions & operator=(
const MinimizerOptions & opt);
85 int PrintLevel()
const {
return fLevel; }
88 unsigned int MaxFunctionCalls()
const {
return fMaxCalls; }
91 unsigned int MaxIterations()
const {
return fMaxIter; }
94 int Strategy()
const {
return fStrategy; }
97 double Tolerance()
const {
return fTolerance; }
100 double Precision()
const {
return fPrecision; }
103 double ErrorDef()
const {
return fErrorDef; }
106 const IOptions * ExtraOptions()
const {
return fExtraOptions; }
109 const std::string & MinimizerType()
const {
return fMinimType; }
112 const std::string & MinimizerAlgorithm()
const {
return fAlgoType; }
115 void Print(std::ostream & os = std::cout)
const;
118 void ResetToDefaultOptions();
121 void SetPrintLevel(
int level) { fLevel = level; }
124 void SetMaxFunctionCalls(
unsigned int maxfcn) { fMaxCalls = maxfcn; }
127 void SetMaxIterations(
unsigned int maxiter) { fMaxIter = maxiter; }
130 void SetTolerance(
double tol) { fTolerance = tol; }
133 void SetPrecision(
double prec) { fPrecision = prec; }
136 void SetStrategy(
int stra) { fStrategy = stra; }
139 void SetErrorDef(
double err) { fErrorDef = err; }
142 void SetMinimizerType(
const char * type) { fMinimType = type; }
145 void SetMinimizerAlgorithm(
const char *type) { fAlgoType = type; }
148 void SetExtraOptions(
const IOptions & opt);
160 std::string fMinimType;
161 std::string fAlgoType;
164 ROOT::Math::IOptions * fExtraOptions;