summaryrefslogtreecommitdiff
path: root/thirdparty/linux/include/coin1/ClpConstraintLinear.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/ClpConstraintLinear.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/ClpConstraintLinear.hpp')
-rw-r--r--thirdparty/linux/include/coin1/ClpConstraintLinear.hpp110
1 files changed, 110 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin1/ClpConstraintLinear.hpp b/thirdparty/linux/include/coin1/ClpConstraintLinear.hpp
new file mode 100644
index 0000000..fd0a4da
--- /dev/null
+++ b/thirdparty/linux/include/coin1/ClpConstraintLinear.hpp
@@ -0,0 +1,110 @@
+/* $Id: ClpConstraintLinear.hpp 1665 2011-01-04 17:55:54Z lou $ */
+// Copyright (C) 2007, International Business Machines
+// Corporation and others. All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+#ifndef ClpConstraintLinear_H
+#define ClpConstraintLinear_H
+
+#include "ClpConstraint.hpp"
+
+//#############################################################################
+
+/** Linear Constraint Class
+
+*/
+
+class ClpConstraintLinear : public ClpConstraint {
+
+public:
+
+ ///@name Stuff
+ //@{
+
+
+ /** Fills gradient. If Linear then solution may be NULL,
+ also returns true value of function and offset so we can use x not deltaX in constraint
+ If refresh is false then uses last solution
+ Uses model for scaling
+ Returns non-zero if gradient udefined at current solution
+ */
+ virtual int gradient(const ClpSimplex * model,
+ const double * solution,
+ double * gradient,
+ double & functionValue ,
+ double & offset,
+ bool useScaling = false,
+ bool refresh = true) const ;
+ /// Resize constraint
+ virtual void resize(int newNumberColumns) ;
+ /// Delete columns in constraint
+ virtual void deleteSome(int numberToDelete, const int * which) ;
+ /// Scale constraint
+ virtual void reallyScale(const double * columnScale) ;
+ /** Given a zeroed array sets nonlinear columns to 1.
+ Returns number of nonlinear columns
+ */
+ virtual int markNonlinear(char * which) const ;
+ /** Given a zeroed array sets possible nonzero coefficients to 1.
+ Returns number of nonzeros
+ */
+ virtual int markNonzero(char * which) const;
+ //@}
+
+
+ ///@name Constructors and destructors
+ //@{
+ /// Default Constructor
+ ClpConstraintLinear();
+
+ /// Constructor from constraint
+ ClpConstraintLinear(int row, int numberCoefficients, int numberColumns,
+ const int * column, const double * element);
+
+ /** Copy constructor .
+ */
+ ClpConstraintLinear(const ClpConstraintLinear & rhs);
+
+ /// Assignment operator
+ ClpConstraintLinear & operator=(const ClpConstraintLinear& rhs);
+
+ /// Destructor
+ virtual ~ClpConstraintLinear ();
+
+ /// Clone
+ virtual ClpConstraint * clone() const;
+ //@}
+ ///@name Gets and sets
+ //@{
+ /// Number of coefficients
+ virtual int numberCoefficients() const;
+ /// Number of columns in linear constraint
+ inline int numberColumns() const {
+ return numberColumns_;
+ }
+ /// Columns
+ inline const int * column() const {
+ return column_;
+ }
+ /// Coefficients
+ inline const double * coefficient() const {
+ return coefficient_;
+ }
+ //@}
+
+ //---------------------------------------------------------------------------
+
+private:
+ ///@name Private member data
+ /// Column
+ int * column_;
+ /// Coefficients
+ double * coefficient_;
+ /// Useful to have number of columns about
+ int numberColumns_;
+ /// Number of coefficients
+ int numberCoefficients_;
+ //@}
+};
+
+#endif