00001
00002
00003
00004
00005
00006 #ifndef ClpPdcoBase_H
00007 #define ClpPdcoBase_H
00008
00009 #include "CoinPragma.hpp"
00010
00011 #include "CoinPackedMatrix.hpp"
00012 #include "CoinDenseVector.hpp"
00013 class ClpInterior;
00014
00025 class ClpPdcoBase {
00026
00027 public:
00030 virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const = 0;
00031
00032 virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;
00033
00034 virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;
00035
00036 virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;
00037
00038 virtual void matPrecon(ClpInterior * model, double delta, double * x, double * y) const = 0;
00039
00041
00042
00043
00044 virtual ClpPdcoBase * clone() const = 0;
00046 inline int type() const {
00047 return type_;
00048 };
00050 inline void setType(int type) {
00051 type_ = type;
00052 };
00054 inline int sizeD1() const {
00055 return 1;
00056 };
00058 inline double getD1() const {
00059 return d1_;
00060 };
00062 inline int sizeD2() const {
00063 return 1;
00064 };
00066 inline double getD2() const {
00067 return d2_;
00068 };
00070
00071
00072 protected:
00073
00079 ClpPdcoBase();
00081 public:
00082 virtual ~ClpPdcoBase();
00083 protected:
00084
00085 ClpPdcoBase(const ClpPdcoBase&);
00086
00087 ClpPdcoBase& operator=(const ClpPdcoBase&);
00089
00090
00091 protected:
00095
00096 double d1_;
00097 double d2_;
00099 int type_;
00101 };
00102
00103 #endif