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

- File List
- File Members

ClpConstraintQuadratic.hpp
Go to the documentation of this file.
1 /* $Id: ClpConstraintQuadratic.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 ClpConstraintQuadratic_H
7 #define ClpConstraintQuadratic_H
8
9 #include "ClpConstraint.hpp"
10
11 //#############################################################################
12
17 class ClpConstraintQuadratic : 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 ClpConstraintQuadratic();
59
61 ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns,
62 const CoinBigIndex * start,
63 const int * column, const double * element);
64
67 ClpConstraintQuadratic(const ClpConstraintQuadratic & rhs);
68
70 ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic& rhs);
71
73 virtual ~ClpConstraintQuadratic ();
74
76 virtual ClpConstraint * clone() const;
78
80 virtual int numberCoefficients() const;
83 inline int numberColumns() const {
84 return numberColumns_;
85 }
87 inline CoinBigIndex * start() const {
88 return start_;
89 }
91 inline const int * column() const {
92 return column_;
93 }
95 inline const double * coefficient() const {
96 return coefficient_;
97 }
99
100 //---------------------------------------------------------------------------
101
102 private:
105 CoinBigIndex * start_;
107 int * column_;
109 double * coefficient_;
111 int numberColumns_;
113 int numberCoefficients_;
115 int numberQuadraticColumns_;
117 };
118
119 #endif
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
ClpConstraintQuadratic::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.
ClpConstraintQuadratic::ClpConstraintQuadratic
ClpConstraintQuadratic()
Default Constructor.
ClpConstraintQuadratic::column
const int * column() const
Columns.
Definition: ClpConstraintQuadratic.hpp:91
ClpConstraint
Constraint Abstract Base Class.
Definition: ClpConstraint.hpp:19
ClpConstraintQuadratic::numberQuadraticColumns_
int numberQuadraticColumns_
Number of quadratic columns.
Definition: ClpConstraintQuadratic.hpp:115
ClpConstraintQuadratic::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraintQuadratic::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintQuadratic::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.
ClpConstraintQuadratic::start
CoinBigIndex * start() const
Column starts.
Definition: ClpConstraintQuadratic.hpp:87
ClpConstraintQuadratic::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraint.hpp
ClpConstraintQuadratic::column_
int * column_
Column (if -1 then linear coefficient)
Definition: ClpConstraintQuadratic.hpp:107
ClpConstraintQuadratic::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraintQuadratic::numberColumns
int numberColumns() const
Number of columns in constraint.
Definition: ClpConstraintQuadratic.hpp:83
ClpConstraintQuadratic::coefficient
const double * coefficient() const
Coefficients.
Definition: ClpConstraintQuadratic.hpp:95
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpConstraintQuadratic::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintQuadratic::~ClpConstraintQuadratic
virtual ~ClpConstraintQuadratic()
Destructor.
ClpConstraintQuadratic::start_
CoinBigIndex * start_
Column (if -1 then linear coefficient)
Definition: ClpConstraintQuadratic.hpp:105
ClpConstraintQuadratic::coefficient_
double * coefficient_
Coefficients.
Definition: ClpConstraintQuadratic.hpp:109
ClpConstraint::offset
double offset() const
Constraint offset.
Definition: ClpConstraint.hpp:100
ClpConstraintQuadratic::markNonlinear
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonquadratic columns to 1.
ClpConstraintQuadratic::numberColumns_
int numberColumns_
Useful to have number of columns about.
Definition: ClpConstraintQuadratic.hpp:111
ClpConstraintQuadratic
Quadratic Constraint Class.
Definition: ClpConstraintQuadratic.hpp:17
ClpConstraintQuadratic::operator=
ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic &rhs)
Assignment operator.
ClpConstraint::functionValue
double functionValue() const
Stored constraint function value.
Definition: ClpConstraint.hpp:95
ClpConstraintQuadratic::numberCoefficients_
int numberCoefficients_
Number of coefficients in gradient.
Definition: ClpConstraintQuadratic.hpp:113