#include <ogdf/lib/abacus/vartype.h>
Inheritance diagram for abacus::VarType:Public Types | |
| enum | TYPE { Continuous, Integer, Binary } |
| The enumeration with the different variable types. More... | |
Public Member Functions | |
| VarType () | |
| The default constructor: Lets the type of the variable uninitialized. More... | |
| VarType (TYPE t) | |
| Creates a variable type t. More... | |
| bool | binary () const |
| Returns true if the type of the variable is Binary, false otherwise. More... | |
| bool | discrete () const |
| Returns true if the type of the variable is Integer or Binary, false otherwise. More... | |
| bool | integer () const |
| Returns true if the type of the variable is Integer, false otherwise. More... | |
| TYPE | type () const |
| Returns the type of the variable. More... | |
| void | type (TYPE t) |
| Sets the variable type to t. More... | |
Public Member Functions inherited from abacus::AbacusRoot | |
| virtual | ~AbacusRoot () |
| The destructor. More... | |
Private Attributes | |
| TYPE | type_ |
| The type of the variable. More... | |
Friends | |
| ostream & | operator<< (ostream &out, const VarType &rhs) |
| Output operator for variable types. 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... | |
Variable types.
Variables can be of three different types: Continuous, Integer or Binary. We distinguish Integer and Binary variables since some operations are performed differently (e.g., branching).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Output operator for variable types.
Writes the variable type to an output stream in the format Continuous, Integer, or Binary.
| out | The output stream. |
| rhs | The variable type being output. |
|
private |