Constraint classification.
More...
#include <ogdf/lib/abacus/conclass.h>
|
static bool | ascii2bool (const string &str) |
| Converts the string str to a boolean value. More...
|
|
static bool | endsWith (const string &str, const string &end) |
| Returns true if str ends with end, false otherwise. More...
|
|
static double | fracPart (double x) |
| Returns the absolute value of the fractional part of x. More...
|
|
static const char * | onOff (bool value) |
| Converts a boolean variable to the strings "on" and "off". More...
|
|
Constraint classification.
For the generation of knapsack cuts in mixed integer optimization problem, a constraint requires certain attributes about the types of its variables and the structure of the constraint. A rather rudimentary classification is implemented in the class ConClass.
Definition at line 44 of file conclass.h.
◆ ConClass()
abacus::ConClass::ConClass |
( |
const Master * |
master, |
|
|
bool |
discrete, |
|
|
bool |
allVarBinary, |
|
|
bool |
trivial, |
|
|
bool |
bound, |
|
|
bool |
varBound |
|
) |
| |
|
inline |
The constructor initializes the constraint classification with.
- Parameters
-
master | A pointer to the corresponding master of the optimization. |
discrete | |
allVarBinary | true if all variables are binary |
trivial | true if it is a bound or a variable upper bound |
bound | true if the constraint is a bound of the variable |
varBound | true if the constraint is a variable upper bound |
Definition at line 56 of file conclass.h.
◆ allVarBinary()
bool abacus::ConClass::allVarBinary |
( |
| ) |
const |
|
inline |
Returns true if all variables with nonzero coefficients of the constraint are binary.
Definition at line 75 of file conclass.h.
◆ trivial()
bool abacus::ConClass::trivial |
( |
| ) |
const |
|
inline |
Returns true if the constraint is a bound or a variable upper bound.
Definition at line 78 of file conclass.h.
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const ConClass & |
rhs |
|
) |
| |
|
friend |
Output operator for constraint classifications.
◆ allVarBinary_
bool abacus::ConClass::allVarBinary_ |
|
private |
true if all variables are binary.
Definition at line 86 of file conclass.h.
◆ bound_
bool abacus::ConClass::bound_ |
|
private |
true if the constraint is a bound of the variable.
Definition at line 92 of file conclass.h.
◆ discrete_
bool abacus::ConClass::discrete_ |
|
private |
◆ trivial_
bool abacus::ConClass::trivial_ |
|
private |
true if it is a bound or a variable lower/upper bound.
Definition at line 89 of file conclass.h.
◆ varBound_
bool abacus::ConClass::varBound_ |
|
private |
true if the constraint is a variable lower/upper bound.
Definition at line 95 of file conclass.h.
The documentation for this class was generated from the following file: