1 |
tim |
997 |
#ifndef _MININIZERPARAMETERSET_H_
|
2 |
|
|
#define _MININIZERPARAMETERSET_H_
|
3 |
|
|
|
4 |
|
|
// base class of minimizer's parameter set
|
5 |
|
|
class MinimizerParameterSet{
|
6 |
|
|
public:
|
7 |
|
|
MinimizerParameterSet(int dim);
|
8 |
|
|
|
9 |
|
|
virtual void setDefaultParameter();
|
10 |
tim |
1000 |
|
11 |
|
|
void setMaxIteration(int iteration) { maxIteration = iteration;}
|
12 |
|
|
int getMaxIteration() { return maxIteration;}
|
13 |
tim |
997 |
|
14 |
|
|
void setStepSize(double step) { stepSize = step;}
|
15 |
|
|
double getStepSize() { return stepSize;}
|
16 |
|
|
|
17 |
|
|
void setMaxStep(double step) { maxStep = step;}
|
18 |
|
|
double getMaxStep() {return maxStep;}
|
19 |
|
|
|
20 |
|
|
void setAbsGradTol(double tol) {absGradTol = tol;}
|
21 |
|
|
double getAbsGradTol() {return absGradTol;}
|
22 |
|
|
|
23 |
|
|
void setAchGradTol(double tol) { absAchGradTol = tol;}
|
24 |
|
|
double getAchGradTol() { return achGradTol;}
|
25 |
|
|
|
26 |
|
|
void setAbsTol(vector<double>& tol) { absTol = tol;}
|
27 |
|
|
vector<double> getAbsTol() { return absTol;}
|
28 |
|
|
|
29 |
|
|
void setRelTol(vector<double> tol) { relTol = tol;}
|
30 |
|
|
vector<double> getRelTol() { return relTol;}
|
31 |
|
|
|
32 |
|
|
void setTotTol(vector<double>& tol) { totTol = tol;}
|
33 |
|
|
vector<double> getTotTol() { return totTol;}
|
34 |
|
|
|
35 |
|
|
protected:
|
36 |
|
|
|
37 |
tim |
1000 |
int maxIteration;
|
38 |
|
|
|
39 |
tim |
997 |
double stepSize;
|
40 |
|
|
|
41 |
|
|
// Name of minimizer
|
42 |
|
|
string methodName;
|
43 |
|
|
|
44 |
|
|
// Absolute gradient tolerance
|
45 |
|
|
double absGradTol;
|
46 |
|
|
|
47 |
|
|
// Achieved gradient tolerance.
|
48 |
|
|
double achGradTol;
|
49 |
|
|
|
50 |
|
|
// Absolute tolerance
|
51 |
|
|
vector<double> absTol;
|
52 |
|
|
|
53 |
|
|
// Relative tolerance
|
54 |
|
|
vector<double> relTol;
|
55 |
|
|
|
56 |
|
|
// Total specified tolerance at convergence
|
57 |
|
|
vector<double> totTol;
|
58 |
|
|
|
59 |
|
|
// Tolerance achieved at convergence.
|
60 |
|
|
vector<double> achTol;
|
61 |
|
|
|
62 |
|
|
};
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
#endif
|