ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NLOPModel.hpp
Revision: 987
Committed: Tue Jan 27 19:15:20 2004 UTC (20 years, 7 months ago) by tim
File size: 1033 byte(s)
Log Message:
revision of constraint for Nonlinear Optimization Model

File Contents

# User Rev Content
1 tim 969 #ifndef _NLOPMODEL_H_
2     #define _NLOPMODEL_H_
3    
4     class NLOPBase{
5     public:
6 tim 975
7 tim 987 virtual ~NLPBase() {}
8 tim 975 virtual void setX(const vector<double>& x) = 0;
9 tim 969
10 tim 975 virtual void setF(const vector<double>& fx) = 0;
11 tim 969
12     virtual int getDim() const = 0;
13 tim 975 virtual int getFevals() const = 0;
14 tim 987 virtual double getF() const = 0;
15 tim 969
16 tim 975 bool hasConstraints() = 0;
17 tim 987 int getConsType() = 0;
18 tim 975 getConstraints() = 0;
19 tim 969
20     virtual void initFcn() = 0;
21 tim 987 virtual double evalF() = 0;
22     virtual double evalF(const ColumnVector &x) = 0;
23     virtual vector<double> evalG() = 0;
24     virtual vector<double> evalG(const ColumnVector &x) = 0;
25 tim 969 virtual SymmetricMatrix evalH() = 0;
26     virtual SymmetricMatrix evalH(ColumnVector &x) = 0;
27     virtual void eval() = 0;
28    
29 tim 975 protected:
30    
31 tim 969 };
32    
33     class NLOPNoDerive : public NLOPBase{
34    
35     };
36    
37     class NLOPFirstDerive : NLOPNoDerive{
38 tim 987 public:
39     vector<double>& grad;
40 tim 969 };
41    
42     class NLOPSecondDerive : NLOPFirstDerive{
43    
44     };
45     #endif