summaryrefslogtreecommitdiff
path: root/thirdparty/linux/include/coin1/ClpPdcoBase.hpp
diff options
context:
space:
mode:
authorGeorgey2017-07-05 11:40:43 +0530
committerGeorgey2017-07-05 11:40:43 +0530
commit938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427 (patch)
treeb343c0ee5609433c80e0de1db8b6886c9126dc2d /thirdparty/linux/include/coin1/ClpPdcoBase.hpp
parent5b72577efe080c5294b32d804e4d26351fef30bc (diff)
downloadFOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.gz
FOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.bz2
FOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.zip
Added linux shared libraries and header files for int and ecos functions
Diffstat (limited to 'thirdparty/linux/include/coin1/ClpPdcoBase.hpp')
-rw-r--r--thirdparty/linux/include/coin1/ClpPdcoBase.hpp103
1 files changed, 103 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin1/ClpPdcoBase.hpp b/thirdparty/linux/include/coin1/ClpPdcoBase.hpp
new file mode 100644
index 0000000..cb8fd8f
--- /dev/null
+++ b/thirdparty/linux/include/coin1/ClpPdcoBase.hpp
@@ -0,0 +1,103 @@
+/* $Id: ClpPdcoBase.hpp 1665 2011-01-04 17:55:54Z lou $ */
+// Copyright (C) 2003, International Business Machines
+// Corporation and others. All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+#ifndef ClpPdcoBase_H
+#define ClpPdcoBase_H
+
+#include "CoinPragma.hpp"
+
+#include "CoinPackedMatrix.hpp"
+#include "CoinDenseVector.hpp"
+class ClpInterior;
+
+/** Abstract base class for tailoring everything for Pcdo
+
+ Since this class is abstract, no object of this type can be created.
+
+ If a derived class provides all methods then all ClpPcdo algorithms
+ should work.
+
+ Eventually we should be able to use ClpObjective and ClpMatrixBase.
+*/
+
+class ClpPdcoBase {
+
+public:
+ /**@name Virtual methods that the derived classes must provide */
+ //@{
+ virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const = 0;
+
+ virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;
+
+ virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;
+
+ virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;
+
+ virtual void matPrecon(ClpInterior * model, double delta, double * x, double * y) const = 0;
+
+ //@}
+ //@{
+ ///@name Other
+ /// Clone
+ virtual ClpPdcoBase * clone() const = 0;
+ /// Returns type
+ inline int type() const {
+ return type_;
+ };
+ /// Sets type
+ inline void setType(int type) {
+ type_ = type;
+ };
+ /// Returns size of d1
+ inline int sizeD1() const {
+ return 1;
+ };
+ /// Returns d1 as scalar
+ inline double getD1() const {
+ return d1_;
+ };
+ /// Returns size of d2
+ inline int sizeD2() const {
+ return 1;
+ };
+ /// Returns d2 as scalar
+ inline double getD2() const {
+ return d2_;
+ };
+ //@}
+
+
+protected:
+
+ /**@name Constructors, destructor<br>
+ <strong>NOTE</strong>: All constructors are protected. There's no need
+ to expose them, after all, this is an abstract class. */
+ //@{
+ /** Default constructor. */
+ ClpPdcoBase();
+ /** Destructor (has to be public) */
+public:
+ virtual ~ClpPdcoBase();
+protected:
+ // Copy
+ ClpPdcoBase(const ClpPdcoBase&);
+ // Assignment
+ ClpPdcoBase& operator=(const ClpPdcoBase&);
+ //@}
+
+
+protected:
+ /**@name Data members
+ The data members are protected to allow access for derived classes. */
+ //@{
+ /// Should be dense vectors
+ double d1_;
+ double d2_;
+ /// type (may be useful)
+ int type_;
+ //@}
+};
+
+#endif