ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/ConjugateMinimizer.hpp
Revision: 1002
Committed: Mon Feb 2 20:29:41 2004 UTC (20 years, 5 months ago) by tim
File size: 1160 byte(s)
Log Message:
Adding GoldenSection and Brent LineSearch Method

File Contents

# Content
1 #ifndef _CONJUGATEMINIMIZER_H_
2 #define _CONJUGATEMINIMIZER_H_
3
4 #include "MinimizerBase.hpp"
5
6 //abstract class of conjugate gradient minimizer
7 class ConjugateMinimizerBase : public Minimize{
8
9 public:
10
11 ConjugateMinimizerBase(NLModel1* nlmodel);
12 ~ConjugateMinimizerBase();
13
14 bool isSolvable();
15 virtual void Init();
16 virtual void Minimize();
17 virtual int isConvergenceAchieved();
18 virtual void reset();
19 virtual void printMinizerInfo();
20
21 protected:
22
23 double calcGamma(vector<double>& newGrad, vector<double>& oldGrad) = 0;
24 NLModel0 * model;
25
26 vector<double> prevGrad;
27 vector<double> gradient;
28 vector<double> prevDirection;
29 vector<double> direction;
30 };
31
32 //Fletcher-Reeves Conjugate Gradient Method
33 class FRCGMinimizer : public ConjugateMinimizerBase{
34
35 protected:
36
37 double calcGamma(vector<double>& newGrad, vector<double>& oldGrad);
38
39 };
40
41 //Polak-Reeves Conjugate Gradient Method
42 class PRCGMinimizer : public ConjugateMinimizerBase{
43
44 protected:
45
46 double calcGamma(vector<double>& newGrad, vector<double>& oldGrad);
47 };
48
49 #endif