Skip to content

Commit 094847b

Browse files
committed
[Minuit2] Remove unused strategy getters and setters from MnStrategy
Settters are redundant, because if you want to create a certain strategy, then you can just use the constructor. Getters for the overall strategy level are unsafe, because they allow you to introduce strategy dependence in a way that is not explicitly clear from the public MnStrategy API.
1 parent f25ee4a commit 094847b

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

math/minuit2/inc/Minuit2/MnStrategy.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,12 @@ class MnStrategy {
4646

4747
int StorageLevel() const { return fStoreLevel; }
4848

49-
bool IsLow() const { return fStrategy == 0; }
50-
bool IsMedium() const { return fStrategy == 1; }
51-
bool IsHigh() const { return fStrategy == 2; }
52-
bool IsVeryHigh() const { return fStrategy >= 3; }
53-
5449
bool RefineGradientInHessian() const { return fStrategy > 0; }
5550

5651
bool ComputeInitialHessian() const { return fStrategy == 2; }
5752

5853
double HessianRecomputeThreshold() const;
5954

60-
void SetLowStrategy();
61-
void SetMediumStrategy();
62-
void SetHighStrategy();
63-
void SetVeryHighStrategy();
64-
6555
void SetGradientNCycles(unsigned int n) { fGradNCyc = n; }
6656
void SetGradientStepTolerance(double stp) { fGradTlrStp = stp; }
6757
void SetGradientTolerance(double toler) { fGradTlr = toler; }
@@ -88,6 +78,11 @@ class MnStrategy {
8878
friend class MnContours;
8979
MnStrategy NextLower() const;
9080

81+
void SetLowStrategy();
82+
void SetMediumStrategy();
83+
void SetHighStrategy();
84+
void SetVeryHighStrategy();
85+
9186
unsigned int fStrategy;
9287

9388
unsigned int fGradNCyc;

0 commit comments

Comments
 (0)