Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpPdcoBase.hpp
Go to the documentation of this file.
1 /* $Id: ClpPdcoBase.hpp 1665 2011-01-04 17:55:54Z lou $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef ClpPdcoBase_H
7 #define ClpPdcoBase_H
8 
9 #include "CoinPragma.hpp"
10 
11 #include "CoinPackedMatrix.hpp"
12 #include "CoinDenseVector.hpp"
13 class ClpInterior;
14 
25 class ClpPdcoBase {
26 
27 public:
30  virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const = 0;
31 
32  virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;
33 
34  virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;
35 
36  virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;
37 
38  virtual void matPrecon(ClpInterior * model, double delta, double * x, double * y) const = 0;
39 
41 
42  virtual ClpPdcoBase * clone() const = 0;
46  inline int type() const {
47  return type_;
48  };
50  inline void setType(int type) {
51  type_ = type;
52  };
54  inline int sizeD1() const {
55  return 1;
56  };
58  inline double getD1() const {
59  return d1_;
60  };
62  inline int sizeD2() const {
63  return 1;
64  };
66  inline double getD2() const {
67  return d2_;
68  };
70 
71 
72 protected:
73 
79  ClpPdcoBase();
81 public:
82  virtual ~ClpPdcoBase();
83 protected:
84  // Copy
85  ClpPdcoBase(const ClpPdcoBase&);
86  // Assignment
89 
90 
91 protected:
95  double d1_;
97  double d2_;
99  int type_;
101 };
102 
103 #endif
void setType(int type)
Sets type.
Definition: ClpPdcoBase.hpp:50
This solves LPs using interior point methods.
Definition: ClpInterior.hpp:72
int type() const
Returns type.
Definition: ClpPdcoBase.hpp:46
virtual ClpPdcoBase * clone() const =0
int sizeD2() const
Returns size of d2.
Definition: ClpPdcoBase.hpp:62
virtual ~ClpPdcoBase()
Destructor (has to be public)
ClpPdcoBase()
Default constructor.
virtual void getGrad(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &grad) const =0
int sizeD1() const
Returns size of d1.
Definition: ClpPdcoBase.hpp:54
virtual double getObj(ClpInterior *model, CoinDenseVector< double > &x) const =0
int type_
type (may be useful)
Definition: ClpPdcoBase.hpp:99
ClpPdcoBase & operator=(const ClpPdcoBase &)
Abstract base class for tailoring everything for Pcdo.
Definition: ClpPdcoBase.hpp:25
double getD1() const
Returns d1 as scalar.
Definition: ClpPdcoBase.hpp:58
double d1_
Should be dense vectors.
Definition: ClpPdcoBase.hpp:96
Dense Vector.
virtual void matPrecon(ClpInterior *model, double delta, double *x, double *y) const =0
virtual void matVecMult(ClpInterior *model, int mode, double *x, double *y) const =0
double getD2() const
Returns d2 as scalar.
Definition: ClpPdcoBase.hpp:66
virtual void getHessian(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &H) const =0