Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 2385 2019-01-06 19:43:06Z unxusr $ */
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 {
48 return type_;
49 };
51 inline void setType(int type)
52 {
53 type_ = type;
54 };
56 inline int sizeD1() const
57 {
58 return 1;
59 };
61 inline double getD1() const
62 {
63 return d1_;
64 };
66 inline int sizeD2() const
67 {
68 return 1;
69 };
71 inline double getD2() const
72 {
73 return d2_;
74 };
76
77 protected:
83 ClpPdcoBase();
85 public:
86 virtual ~ClpPdcoBase();
87
88 protected:
89 // Copy
90 ClpPdcoBase(const ClpPdcoBase &);
91 // Assignment
92 ClpPdcoBase &operator=(const ClpPdcoBase &);
94
95 protected:
99 double d1_;
101 double d2_;
103 int type_;
105 };
106
107 #endif
108
109 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
110 */
ClpPdcoBase::setType
void setType(int type)
Sets type.
Definition: ClpPdcoBase.hpp:51
ClpInterior
This solves LPs using interior point methods.
Definition: ClpInterior.hpp:72
CoinDenseVector.hpp
ClpPdcoBase::d2_
double d2_
Definition: ClpPdcoBase.hpp:101
ClpPdcoBase::type
int type() const
Returns type.
Definition: ClpPdcoBase.hpp:46
ClpPdcoBase::clone
virtual ClpPdcoBase * clone() const =0
ClpPdcoBase::sizeD2
int sizeD2() const
Returns size of d2.
Definition: ClpPdcoBase.hpp:66
ClpPdcoBase::~ClpPdcoBase
virtual ~ClpPdcoBase()
Destructor (has to be public)
ClpPdcoBase::ClpPdcoBase
ClpPdcoBase()
Default constructor.
ClpPdcoBase::getGrad
virtual void getGrad(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &grad) const =0
ClpPdcoBase::sizeD1
int sizeD1() const
Returns size of d1.
Definition: ClpPdcoBase.hpp:56
ClpPdcoBase::getObj
virtual double getObj(ClpInterior *model, CoinDenseVector< double > &x) const =0
ClpPdcoBase::type_
int type_
type (may be useful)
Definition: ClpPdcoBase.hpp:103
CoinPragma.hpp
ClpPdcoBase::operator=
ClpPdcoBase & operator=(const ClpPdcoBase &)
ClpPdcoBase
Abstract base class for tailoring everything for Pcdo.
Definition: ClpPdcoBase.hpp:25
ClpPdcoBase::getD1
double getD1() const
Returns d1 as scalar.
Definition: ClpPdcoBase.hpp:61
ClpPdcoBase::d1_
double d1_
Should be dense vectors.
Definition: ClpPdcoBase.hpp:100
CoinDenseVector
Dense Vector.
Definition: CoinDenseVector.hpp:68
ClpPdcoBase::matPrecon
virtual void matPrecon(ClpInterior *model, double delta, double *x, double *y) const =0
ClpPdcoBase::matVecMult
virtual void matVecMult(ClpInterior *model, int mode, double *x, double *y) const =0
ClpPdcoBase::getD2
double getD2() const
Returns d2 as scalar.
Definition: ClpPdcoBase.hpp:71
ClpPdcoBase::getHessian
virtual void getHessian(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &H) const =0
CoinPackedMatrix.hpp