1 |
#ifndef _MINIMIZERBASE_H_
|
2 |
#define _MINIMIZERBASE_H_
|
3 |
|
4 |
class MinimizerBase{
|
5 |
public:
|
6 |
|
7 |
virtual void Minimize() = 0;
|
8 |
virtual int step() = 0;
|
9 |
virtual bool testConvergence() = 0;
|
10 |
|
11 |
virtual bool isSolvable() = 0;
|
12 |
|
13 |
void double setFTol(double tol);
|
14 |
void double setGradTol(double gradTol);
|
15 |
|
16 |
void setStepSize(double step) { stepSize = step;}
|
17 |
double getStepSize() { return stepSize;}
|
18 |
|
19 |
void setMaxStep(double step) { maxStep = step;}
|
20 |
double getMaxStep() {return maxStep;}
|
21 |
|
22 |
const string& getMethodName() {return methodName;}
|
23 |
void setMethodName(const string& name) { methodName = name;}
|
24 |
|
25 |
void setObjFunctor();
|
26 |
void getObjFunctor();
|
27 |
|
28 |
/*
|
29 |
void setUpdateFunctor();
|
30 |
void getUpdateFunctor();
|
31 |
|
32 |
void setSearchFunctor();
|
33 |
void getSearchFunctor();
|
34 |
*/
|
35 |
|
36 |
protected:
|
37 |
|
38 |
double stepSize;
|
39 |
double maxStep;
|
40 |
double fTol;
|
41 |
double gradTol;
|
42 |
string methodName;
|
43 |
|
44 |
bool hasObjFunctor;
|
45 |
|
46 |
/*
|
47 |
bool hasUpdateFunctor;
|
48 |
|
49 |
bool hasSearchFunctor;
|
50 |
*/
|
51 |
|
52 |
};
|
53 |
#endif
|