Clp 1.17.6

- 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
ClpConstraintQuadratic.hpp
Go to the documentation of this file.
1 /* $Id: ClpConstraintQuadratic.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
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:
21
22
29 virtual int gradient(const ClpSimplex *model,
30 const double *solution,
31 double *gradient,
32 double &functionValue,
33 double &offset,
34 bool useScaling = false,
35 bool refresh = true) const;
37 virtual void resize(int newNumberColumns);
39 virtual void deleteSome(int numberToDelete, const int *which);
41 virtual void reallyScale(const double *columnScale);
45 virtual int markNonlinear(char *which) const;
49 virtual int markNonzero(char *which) const;
51
53
54 ClpConstraintQuadratic();
56
58 ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns,
59 const CoinBigIndex *start,
60 const int *column, const double *element);
61
64 ClpConstraintQuadratic(const ClpConstraintQuadratic &rhs);
65
67 ClpConstraintQuadratic &operator=(const ClpConstraintQuadratic &rhs);
68
70 virtual ~ClpConstraintQuadratic();
71
73 virtual ClpConstraint *clone() const;
75
77 virtual int numberCoefficients() const;
80 inline int numberColumns() const
81 {
82 return numberColumns_;
83 }
85 inline CoinBigIndex *start() const
86 {
87 return start_;
88 }
90 inline const int *column() const
91 {
92 return column_;
93 }
95 inline const double *coefficient() const
96 {
97 return coefficient_;
98 }
100
101 //---------------------------------------------------------------------------
102
103 private:
106 CoinBigIndex *start_;
108 int *column_;
110 double *coefficient_;
112 int numberColumns_;
114 int numberCoefficients_;
116 int numberQuadraticColumns_;
118 };
119
120 #endif
121
122 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
123 */
ClpConstraint::offset
double offset() const
Constraint offset.
Definition: ClpConstraint.hpp:100
ClpConstraintQuadratic::ClpConstraintQuadratic
ClpConstraintQuadratic()
Default Constructor.
ClpConstraintQuadratic::numberCoefficients_
int numberCoefficients_
Number of coefficients in gradient.
Definition: ClpConstraintQuadratic.hpp:114
ClpConstraintQuadratic::column_
int * column_
Column (if -1 then linear coefficient)
Definition: ClpConstraintQuadratic.hpp:108
ClpConstraint
Constraint Abstract Base Class.
Definition: ClpConstraint.hpp:18
ClpConstraint.hpp
ClpConstraintQuadratic::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintQuadratic::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintQuadratic::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraint::functionValue
double functionValue() const
Stored constraint function value.
Definition: ClpConstraint.hpp:94
ClpConstraintQuadratic::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraintQuadratic::start_
CoinBigIndex * start_
Definition: ClpConstraintQuadratic.hpp:106
ClpConstraintQuadratic::~ClpConstraintQuadratic
virtual ~ClpConstraintQuadratic()
Destructor.
ClpConstraintQuadratic::coefficient
const double * coefficient() const
Coefficients.
Definition: ClpConstraintQuadratic.hpp:95
ClpConstraintQuadratic::numberQuadraticColumns_
int numberQuadraticColumns_
Number of quadratic columns.
Definition: ClpConstraintQuadratic.hpp:116
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
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:112
ClpConstraintQuadratic::coefficient_
double * coefficient_
Coefficients.
Definition: ClpConstraintQuadratic.hpp:110
ClpConstraintQuadratic::numberColumns
int numberColumns() const
Number of columns in constraint.
Definition: ClpConstraintQuadratic.hpp:80
ClpConstraintQuadratic::column
const int * column() const
Columns.
Definition: ClpConstraintQuadratic.hpp:90
ClpConstraintQuadratic::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraintQuadratic::start
CoinBigIndex * start() const
Column starts.
Definition: ClpConstraintQuadratic.hpp:85
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
ClpConstraintQuadratic::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.
ClpConstraintQuadratic::operator=
ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic &rhs)
Assignment operator.
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
Quadratic Constraint Class.
Definition: ClpConstraintQuadratic.hpp:17