Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnStrategy.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MnStrategy
11#define ROOT_Minuit2_MnStrategy
12
13namespace ROOT {
14
15namespace Minuit2 {
16
17//_________________________________________________________________________
18/**
19 API class for defining three levels of strategies: low (0), medium (1),
20 high (>=2);
21 acts on: Migrad (behavioural),
22 Minos (lowers strategy by 1 for Minos-own minimization),
23 Hesse (iterations),
24 Numerical2PDerivative (iterations)
25 */
26
28
29public:
30 // default strategy
31 MnStrategy();
32
33 // user defined strategy (0, 1, >=2)
34 explicit MnStrategy(unsigned int);
35
37
38 unsigned int Strategy() const { return fStrategy; }
39
40 unsigned int GradientNCycles() const { return fGradNCyc; }
41 double GradientStepTolerance() const { return fGradTlrStp; }
42 double GradientTolerance() const { return fGradTlr; }
43
44 unsigned int HessianNCycles() const { return fHessNCyc; }
45 double HessianStepTolerance() const { return fHessTlrStp; }
46 double HessianG2Tolerance() const { return fHessTlrG2; }
47 unsigned int HessianGradientNCycles() const { return fHessGradNCyc; }
48
49 int StorageLevel() const { return fStoreLevel; }
50
51 bool IsLow() const { return fStrategy == 0; }
52 bool IsMedium() const { return fStrategy == 1; }
53 bool IsHigh() const { return fStrategy >= 2; }
54
55 void SetLowStrategy();
56 void SetMediumStrategy();
57 void SetHighStrategy();
58
59 void SetGradientNCycles(unsigned int n) { fGradNCyc = n; }
60 void SetGradientStepTolerance(double stp) { fGradTlrStp = stp; }
61 void SetGradientTolerance(double toler) { fGradTlr = toler; }
62
63 void SetHessianNCycles(unsigned int n) { fHessNCyc = n; }
64 void SetHessianStepTolerance(double stp) { fHessTlrStp = stp; }
65 void SetHessianG2Tolerance(double toler) { fHessTlrG2 = toler; }
66 void SetHessianGradientNCycles(unsigned int n) { fHessGradNCyc = n; }
67
68 // set storage level of iteration quantities
69 // 0 = store only last iterations 1 = full storage (default)
70 void SetStorageLevel(unsigned int level) { fStoreLevel = level; }
71
72private:
73 unsigned int fStrategy;
74
75 unsigned int fGradNCyc;
77 double fGradTlr;
78 unsigned int fHessNCyc;
80 double fHessTlrG2;
81 unsigned int fHessGradNCyc;
83};
84
85} // namespace Minuit2
86
87} // namespace ROOT
88
89#endif // ROOT_Minuit2_MnStrategy
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition MnStrategy.h:27
double HessianG2Tolerance() const
Definition MnStrategy.h:46
unsigned int Strategy() const
Definition MnStrategy.h:38
unsigned int fHessGradNCyc
Definition MnStrategy.h:81
unsigned int HessianGradientNCycles() const
Definition MnStrategy.h:47
double GradientStepTolerance() const
Definition MnStrategy.h:41
void SetStorageLevel(unsigned int level)
Definition MnStrategy.h:70
void SetHessianNCycles(unsigned int n)
Definition MnStrategy.h:63
void SetHessianStepTolerance(double stp)
Definition MnStrategy.h:64
double GradientTolerance() const
Definition MnStrategy.h:42
void SetGradientTolerance(double toler)
Definition MnStrategy.h:61
double HessianStepTolerance() const
Definition MnStrategy.h:45
unsigned int HessianNCycles() const
Definition MnStrategy.h:44
unsigned int GradientNCycles() const
Definition MnStrategy.h:40
void SetGradientNCycles(unsigned int n)
Definition MnStrategy.h:59
void SetGradientStepTolerance(double stp)
Definition MnStrategy.h:60
void SetHessianGradientNCycles(unsigned int n)
Definition MnStrategy.h:66
void SetHessianG2Tolerance(double toler)
Definition MnStrategy.h:65
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...