Clp 1.17.5
Loading...
Searching...
No Matches
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"
13class ClpInterior;
14
26
27public:
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
44 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
77protected:
85public:
86 virtual ~ClpPdcoBase();
87
88protected:
89 // Copy
91 // Assignment
94
95protected:
100 double d1_;
101 double d2_;
103 int type_;
105};
106
107#endif
108
109/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
110*/
This solves LPs using interior point methods.
Abstract base class for tailoring everything for Pcdo.
void setType(int type)
Sets type.
int type() const
Returns type.
ClpPdcoBase()
Default constructor.
ClpPdcoBase(const ClpPdcoBase &)
virtual void getHessian(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &H) const =0
virtual ~ClpPdcoBase()
Destructor (has to be public)
double d1_
Should be dense vectors.
virtual ClpPdcoBase * clone() const =0
int type_
type (may be useful)
ClpPdcoBase & operator=(const ClpPdcoBase &)
int sizeD1() const
Returns size of d1.
virtual void getGrad(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &grad) const =0
double getD1() const
Returns d1 as scalar.
virtual void matVecMult(ClpInterior *model, int mode, double *x, double *y) const =0
int sizeD2() const
Returns size of d2.
virtual double getObj(ClpInterior *model, CoinDenseVector< double > &x) const =0
double getD2() const
Returns d2 as scalar.
virtual void matPrecon(ClpInterior *model, double delta, double *x, double *y) const =0