Constraint classification. More...
#include <ogdf/lib/abacus/conclass.h>
Public Member Functions | |
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. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Attributes | |
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. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const ConClass &rhs) |
Output operator for constraint classifications. | |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
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 44 of file conclass.h.
|
inline |
The constructor initializes the constraint classification with.
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.
|
inline |
Returns true if all variables with nonzero coefficients of the constraint are binary.
Definition at line 75 of file conclass.h.
|
inline |
Returns true if the constraint is a bound or a variable upper bound.
Definition at line 78 of file conclass.h.
Output operator for constraint classifications.
|
private |
true if all variables are binary.
Definition at line 86 of file conclass.h.
|
private |
true if the constraint is a bound of the variable.
Definition at line 92 of file conclass.h.
|
private |
Definition at line 83 of file conclass.h.
|
private |
true if it is a bound or a variable lower/upper bound.
Definition at line 89 of file conclass.h.
|
private |
true if the constraint is a variable lower/upper bound.
Definition at line 95 of file conclass.h.