Constraint classification.
More...
#include <ogdf/lib/abacus/conclass.h>
|
| | ConClass (const Master *master, bool discrete, bool allVarBinary, bool trivial, bool bound, bool varBound) |
| | The constructor initializes the constraint classification with.
|
| |
| bool | allVarBinary () const |
| | Returns true if all variables with nonzero coefficients of the constraint are binary.
|
| |
| bool | trivial () const |
| | Returns true if the constraint is a bound or a variable upper bound.
|
| |
| virtual | ~AbacusRoot () |
| | The destructor.
|
| |
|
| bool | allVarBinary_ |
| | true if all variables are binary.
|
| |
| bool | bound_ |
| | true if the constraint is a bound of the variable.
|
| |
| bool | discrete_ |
| |
| bool | trivial_ |
| | true if it is a bound or a variable lower/upper bound.
|
| |
| bool | varBound_ |
| | true if the constraint is a variable lower/upper bound.
|
| |
|
| std::ostream & | operator<< (std::ostream &out, const ConClass &rhs) |
| | Output operator for constraint classifications.
|
| |
|
| static bool | ascii2bool (const string &str) |
| | Converts the string str to a boolean value.
|
| |
| static bool | endsWith (const string &str, const string &end) |
| | Returns true if str ends with end, false otherwise.
|
| |
| static double | fracPart (double x) |
| | Returns the absolute value of the fractional part of x.
|
| |
| static const char * | onOff (bool value) |
| | Converts a boolean variable to the strings "on" and "off".
|
| |
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 45 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 57 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 76 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 79 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 87 of file conclass.h.
◆ bound_
| bool abacus::ConClass::bound_ |
|
private |
true if the constraint is a bound of the variable.
Definition at line 93 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 90 of file conclass.h.
◆ varBound_
| bool abacus::ConClass::varBound_ |
|
private |
true if the constraint is a variable lower/upper bound.
Definition at line 96 of file conclass.h.
The documentation for this class was generated from the following file: