ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/MinimizerBase.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/MinimizerBase.hpp (file contents):
Revision 987 by tim, Tue Jan 27 19:15:20 2004 UTC vs.
Revision 1031 by tim, Fri Feb 6 18:58:06 2004 UTC

# Line 1 | Line 1
1   #ifndef _MINIMIZERBASE_H_
2   #define _MINIMIZERBASE_H_
3  
4 + #include <string>
5 + #include <vector>
6 +
7 + #include "MinimizerParameterSet.hpp"
8 + #include "NLModel.hpp"
9 +
10 + #define MINSTATUS_ERROR -1
11 + #define MINSTATUS_CONVERGE 0
12 + #define MINSTATUS_MAXITER 1
13 +
14 + using namespace std;
15 +
16   class MinimizerBase{
17    public:
18  
19 <    virtual void Init() = 0;
20 <    virtual void Minimize() = 0;
21 <    virtual int step() = 0;
22 <    virtual int testConvergence() = 0;
19 >    //initialize the minimizer method
20 >    virtual void init() = 0;
21 >
22 >    //minimize the model
23 >    virtual void minimize() = 0;
24      
25 +    //
26 +    virtual int checkConvergence() = 0;
27  
28 +    //check whether the model and the method are matched or not    
29      virtual bool isSolvable() = 0;
30  
31 <    void double setFTol(double tol);
32 <    void double setGradTol(double gradTol);
31 >    // get the final status of minimization
32 >    int getMinimizationStatus() {return minStatus;}
33  
34 <    void setStepSize(double step) { stepSize = step;}
35 <    double getStepSize() { return stepSize;}
34 >    // get the name of minimization method
35 >    const string getName() {return minimizerName;}
36  
37 <    void setMaxStep(double step) { maxStep = step;}
38 <    double getMaxStep() {return maxStep;}
37 >    //set the name of minimiation method
38 >    void setName(const string& name) { minimizerName = name;}
39  
24    const string& getMethodName() {return methodName;}
25    void setMethodName(const string& name) { methodName = name;}
26
40    protected:
41 +    
42 +    int minStatus;
43 +    string minimizerName;
44  
29    double stepSize;
30    double maxStep;
31    double fTol;
32    double gradTol;
33    string methodName;
45   };
46 +
47   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines