Clp
1.17.11
Toggle main menu visibility
Loading...
Searching...
No Matches
Clp
src
ClpConstraintLinear.hpp
Go to the documentation of this file.
1
/* $Id$ */
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
16
17
class
ClpConstraintLinear
:
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
55
ClpConstraintLinear
();
56
58
ClpConstraintLinear
(
int
row,
int
numberCoefficients
,
int
numberColumns
,
59
const
int
*
column
,
const
double
*element);
60
63
ClpConstraintLinear
(
const
ClpConstraintLinear
&rhs);
64
66
ClpConstraintLinear
&
operator=
(
const
ClpConstraintLinear
&rhs);
67
69
virtual
~ClpConstraintLinear
();
70
72
virtual
ClpConstraint
*
clone
()
const
;
74
76
77
virtual
int
numberCoefficients
()
const
;
79
inline
int
numberColumns
()
const
80
{
81
return
numberColumns_
;
82
}
83
84
inline
const
int
*
column
()
const
85
{
86
return
column_
;
87
}
88
89
inline
const
double
*
coefficient
()
const
90
{
91
return
coefficient_
;
92
}
93
94
95
//---------------------------------------------------------------------------
96
97
private
:
100
int
*
column_
;
102
double
*
coefficient_
;
104
int
numberColumns_
;
106
int
numberCoefficients_
;
108
};
109
110
#endif
111
112
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
113
*/
ClpConstraint.hpp
ClpConstraintLinear::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraintLinear::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraintLinear::markNonlinear
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonlinear columns to 1.
ClpConstraintLinear::column_
int * column_
Definition
ClpConstraintLinear.hpp:100
ClpConstraintLinear::ClpConstraintLinear
ClpConstraintLinear(int row, int numberCoefficients, int numberColumns, const int *column, const double *element)
Constructor from constraint.
ClpConstraintLinear::column
const int * column() const
Columns.
Definition
ClpConstraintLinear.hpp:84
ClpConstraintLinear::coefficient
const double * coefficient() const
Coefficients.
Definition
ClpConstraintLinear.hpp:89
ClpConstraintLinear::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintLinear::ClpConstraintLinear
ClpConstraintLinear(const ClpConstraintLinear &rhs)
Copy constructor .
ClpConstraintLinear::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraintLinear::~ClpConstraintLinear
virtual ~ClpConstraintLinear()
Destructor.
ClpConstraintLinear::operator=
ClpConstraintLinear & operator=(const ClpConstraintLinear &rhs)
Assignment operator.
ClpConstraintLinear::ClpConstraintLinear
ClpConstraintLinear()
Default Constructor.
ClpConstraintLinear::coefficient_
double * coefficient_
Coefficients.
Definition
ClpConstraintLinear.hpp:102
ClpConstraintLinear::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.
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::numberColumns_
int numberColumns_
Useful to have number of columns about.
Definition
ClpConstraintLinear.hpp:104
ClpConstraintLinear::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintLinear::numberColumns
int numberColumns() const
Number of columns in linear constraint.
Definition
ClpConstraintLinear.hpp:79
ClpConstraint::functionValue
virtual double functionValue(const ClpSimplex *model, const double *solution, bool useScaling=false, bool refresh=true) const
Constraint function value.
ClpConstraint::offset
double offset() const
Constraint offset.
Definition
ClpConstraint.hpp:100
ClpConstraint::ClpConstraint
ClpConstraint()
Default Constructor.
ClpSimplex
This solves LPs using the simplex method.
Definition
ClpSimplex.hpp:106
Generated by
1.17.0