Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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. More...
 
bool allVarBinary () const
 Returns true if all variables with nonzero coefficients of the constraint are binary. More...
 
bool trivial () const
 Returns true if the constraint is a bound or a variable upper bound. More...
 
- Public Member Functions inherited from abacus::AbacusRoot
virtual ~AbacusRoot ()
 The destructor. More...
 

Private Attributes

bool allVarBinary_
 true if all variables are binary. More...
 
bool bound_
 true if the constraint is a bound of the variable. More...
 
bool discrete_
 
bool trivial_
 true if it is a bound or a variable lower/upper bound. More...
 
bool varBound_
 true if the constraint is a variable lower/upper bound. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const ConClass &rhs)
 Output operator for constraint classifications. More...
 

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

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