ClpPdcoBase.hpp
Go to the documentation of this file.
1 /* $Id: ClpPdcoBase.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpPdcoBase_H
5 #define ClpPdcoBase_H
6 
7 #include "CoinPragma.hpp"
8 
9 #include "CoinPackedMatrix.hpp"
10 #include "CoinDenseVector.hpp"
11 class ClpInterior;
12 
23 class ClpPdcoBase {
24 
25 public:
28  virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const = 0;
29 
30  virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;
31 
32  virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;
33 
34  virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;
35 
36  virtual void matPrecon(ClpInterior * model, double delta, double * x, double * y) const = 0;
37 
39 
40  virtual ClpPdcoBase * clone() const = 0;
44  inline int type() const {
45  return type_;
46  };
48  inline void setType(int type) {
49  type_ = type;
50  };
52  inline int sizeD1() const {
53  return 1;
54  };
56  inline double getD1() const {
57  return d1_;
58  };
60  inline int sizeD2() const {
61  return 1;
62  };
64  inline double getD2() const {
65  return d2_;
66  };
68 
69 
70 protected:
71 
77  ClpPdcoBase();
79 public:
80  virtual ~ClpPdcoBase();
81 protected:
82  // Copy
83  ClpPdcoBase(const ClpPdcoBase&);
84  // Assignment
87 
88 
89 protected:
93  double d1_;
95  double d2_;
97  int type_;
99 };
100 
101 #endif