Cgl 0.59.7

- 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
ClpConstraintLinear.hpp
Go to the documentation of this file.
1 /* $Id: ClpConstraintLinear.hpp 1665 2011-01-04 17:55:54Z lou $ */
2 // Copyright (C) 2007, 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 ClpConstraintLinear_H
7 #define ClpConstraintLinear_H
8
9 #include "ClpConstraint.hpp"
10
11 //#############################################################################
12
17 class ClpConstraintLinear : public ClpConstraint {
18
19 public:
20
22
23
24
31 virtual int gradient(const ClpSimplex * model,
32 const double * solution,
33 double * gradient,
34 double & functionValue ,
35 double & offset,
36 bool useScaling = false,
37 bool refresh = true) const ;
39 virtual void resize(int newNumberColumns) ;
41 virtual void deleteSome(int numberToDelete, const int * which) ;
43 virtual void reallyScale(const double * columnScale) ;
47 virtual int markNonlinear(char * which) const ;
51 virtual int markNonzero(char * which) const;
53
54
56
57 ClpConstraintLinear();
59
61 ClpConstraintLinear(int row, int numberCoefficients, int numberColumns,
62 const int * column, const double * element);
63
66 ClpConstraintLinear(const ClpConstraintLinear & rhs);
67
69 ClpConstraintLinear & operator=(const ClpConstraintLinear& rhs);
70
72 virtual ~ClpConstraintLinear ();
73
75 virtual ClpConstraint * clone() const;
77
79 virtual int numberCoefficients() const;
82 inline int numberColumns() const {
83 return numberColumns_;
84 }
86 inline const int * column() const {
87 return column_;
88 }
90 inline const double * coefficient() const {
91 return coefficient_;
92 }
94
95 //---------------------------------------------------------------------------
96
97 private:
100 int * column_;
102 double * coefficient_;
104 int numberColumns_;
106 int numberCoefficients_;
108 };
109
110 #endif
ClpConstraintLinear::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraint::offset
double offset() const
Constraint offset.
Definition: ClpConstraint.hpp:100
ClpConstraintLinear::operator=
ClpConstraintLinear & operator=(const ClpConstraintLinear &rhs)
Assignment operator.
ClpConstraintLinear::column_
int * column_
Definition: ClpConstraintLinear.hpp:100
ClpConstraintLinear::markNonlinear
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonlinear columns to 1.
ClpConstraintLinear::column
const int * column() const
Columns.
Definition: ClpConstraintLinear.hpp:86
ClpConstraint
Constraint Abstract Base Class.
Definition: ClpConstraint.hpp:19
ClpConstraint.hpp
ClpConstraintLinear::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraintLinear::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraintLinear
Linear Constraint Class.
Definition: ClpConstraintLinear.hpp:17
ClpConstraint::functionValue
double functionValue() const
Stored constraint function value.
Definition: ClpConstraint.hpp:95
ClpConstraintLinear::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintLinear::coefficient
const double * coefficient() const
Coefficients.
Definition: ClpConstraintLinear.hpp:90
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpConstraintLinear::coefficient_
double * coefficient_
Coefficients.
Definition: ClpConstraintLinear.hpp:102
ClpConstraintLinear::numberColumns
int numberColumns() const
Number of columns in linear constraint.
Definition: ClpConstraintLinear.hpp:82
ClpConstraintLinear::numberColumns_
int numberColumns_
Useful to have number of columns about.
Definition: ClpConstraintLinear.hpp:104
ClpConstraintLinear::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintLinear::~ClpConstraintLinear
virtual ~ClpConstraintLinear()
Destructor.
ClpConstraintLinear::numberCoefficients_
int numberCoefficients_
Number of coefficients.
Definition: ClpConstraintLinear.hpp:106
ClpConstraintLinear::gradient
virtual int gradient(const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const
Fills gradient.
ClpConstraintLinear::ClpConstraintLinear
ClpConstraintLinear()
Default Constructor.
ClpConstraintLinear::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.