Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
abacus::ConClass Class Reference

Constraint classification. More...

#include <ogdf/lib/abacus/conclass.h>

+ Inheritance diagram for abacus::ConClass:

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 charonOff (bool value)
 Converts a boolean variable to the strings "on" and "off".
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
masterA pointer to the corresponding master of the optimization.
discrete
allVarBinarytrue if all variables are binary
trivialtrue if it is a bound or a variable upper bound
boundtrue if the constraint is a bound of the variable
varBoundtrue if the constraint is a variable upper bound

Definition at line 56 of file conclass.h.

Member Function Documentation

◆ 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.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const ConClass rhs 
)
friend

Output operator for constraint classifications.

Member Data Documentation

◆ 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

Definition at line 83 of file conclass.h.

◆ 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: