|
|
delpi
0.0.1
DElta-complete LP solver
|
Real symbolic variable. More...
#include <Variable.h>
Public Member Functions | |
| Variable () | |
| Construct a new dummy variable object. | |
| Variable (std::string name) | |
| Construct a new real variable object, assigning it a name. | |
| Variable (Id id) | |
| Construct a new real variable object, but instead of creating a new one, it will use the given id, effectively "connecting" the object to an existing variable. | |
Static Public Attributes | |
| static const Id | dummy_id {std::numeric_limits<Id>::max()} |
| ID of the dummy variable. | |
Static Private Member Functions | |
| static Id | GetNextId () |
| Get the next unique identifier for a variable. | |
Private Attributes | |
| Id | id_ {} |
| Unique identifier. | |
Static Private Attributes | |
| static std::vector< std::string > | names_ {{"dummy"}} |
| Names of all existing variables. | |
Real symbolic variable.
Definition at line 20 of file Variable.h.
|
inline |
Construct a new dummy variable object.
The default constructor is needed to support some data structures. The objects created by the default constructor share the same ID, std::numeric_limits<Id>::max(). As a result, they all are identified as a single variable by equality operator (==) and have the same hash value as well. It is allowed to construct a dummy variable, but it should not be used to construct a symbolic expression.
Definition at line 34 of file Variable.h.
|
explicit |
Construct a new real variable object, assigning it a name.
It will be given a unique incremental ID.
| name | name of the variable |
Definition at line 30 of file Variable.cpp.
|
explicit |
Construct a new real variable object, but instead of creating a new one, it will use the given id, effectively "connecting" the object to an existing variable.
| id | unique identifier |
Definition at line 26 of file Variable.cpp.
|
staticprivate |
Get the next unique identifier for a variable.
Definition at line 21 of file Variable.cpp.