#include <ogdf/lib/abacus/vartype.h>
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. | |
VarType (TYPE t) | |
Creates a variable type t. | |
bool | binary () const |
Returns true if the type of the variable is Binary, false otherwise. | |
bool | discrete () const |
Returns true if the type of the variable is Integer or Binary, false otherwise. | |
bool | integer () const |
Returns true if the type of the variable is Integer, false otherwise. | |
TYPE | type () const |
Returns the type of the variable. | |
void | type (TYPE t) |
Sets the variable type to t. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Attributes | |
TYPE | type_ |
The type of the variable. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const VarType &rhs) |
Output operator for variable types. | |
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". | |
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 |
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 |