1 |
< |
#ifndef _MININIZERPARAMETERSET_H_ |
2 |
< |
|
3 |
< |
#define _MININIZERPARAMETERSET_H_ |
4 |
< |
|
1 |
> |
#ifndef MINIMIZERS_MININIZERPARAMETERSET_HPP |
2 |
> |
#define MINIMIZERS_MININIZERPARAMETERSET_HPP |
3 |
> |
#include "brains/SimInfo.hpp" |
4 |
|
namespace oopse { |
5 |
|
|
6 |
|
// base class of minimizer's parameter set |
8 |
|
class MinimizerParameterSet { |
9 |
|
public: |
10 |
|
|
11 |
< |
MinimizerParameterSet() { |
13 |
< |
setDefaultParameter(); |
14 |
< |
} |
11 |
> |
MinimizerParameterSet(SimInfo* info); |
12 |
|
|
13 |
< |
MinimizerParameterSet(MinimizerParameterSet ¶m) { |
17 |
< |
* this = param; |
18 |
< |
} |
13 |
> |
void setDefaultParameter(); |
14 |
|
|
20 |
– |
void operator =(MinimizerParameterSet ¶m) { |
21 |
– |
maxIteration = param.maxIteration; |
22 |
– |
|
23 |
– |
stepSize = param.stepSize; |
24 |
– |
|
25 |
– |
stepTol = param.stepTol; |
26 |
– |
|
27 |
– |
fTol = param.fTol; |
28 |
– |
|
29 |
– |
gTol = param.gTol; |
30 |
– |
|
31 |
– |
writeFrq = param.writeFrq; |
32 |
– |
|
33 |
– |
lsMaxIteration = param.lsMaxIteration; |
34 |
– |
|
35 |
– |
lsTol = param.lsTol; |
36 |
– |
} |
37 |
– |
|
38 |
– |
virtual void setDefaultParameter() { |
39 |
– |
maxIteration = 200; |
40 |
– |
|
41 |
– |
stepSize = 0.01; |
42 |
– |
|
43 |
– |
stepTol = DEFAULTTOLERANCE; |
44 |
– |
|
45 |
– |
fTol = DEFAULTTOLERANCE; |
46 |
– |
|
47 |
– |
gTol = DEFAULTTOLERANCE; |
48 |
– |
|
49 |
– |
writeFrq = maxIteration; |
50 |
– |
|
51 |
– |
lsMaxIteration = 50; |
52 |
– |
|
53 |
– |
lsTol = DEFAULTTOLERANCE; |
54 |
– |
} |
55 |
– |
|
15 |
|
void setStepTol(double tol) { |
16 |
|
stepTol = tol; |
17 |
|
} |
94 |
|
|
95 |
|
int writeFrq; |
96 |
|
|
97 |
< |
static const double DEFAULTTOLERANCE = 1.0e-8; |
97 |
> |
static const double defaultTolerance = 1.0e-8; |
98 |
|
|
99 |
|
}; |
100 |
|
|