dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
Represents a symbolic variable. More...
#include <symbolic_variable.h>
Public Types | |
enum class | Type { CONTINUOUS , INTEGER , BINARY , BOOLEAN } |
Supported types of symbolic variables. More... | |
Public Member Functions | |
Variable () | |
Default constructor. | |
~Variable ()=default | |
Default destructor. | |
Variable (std::string name, Type type=Type::CONTINUOUS) | |
Constructs a variable with a string. | |
bool | is_dummy () const |
Checks if this is a dummy variable (ID = 0) which is created by the default constructor. | |
bool | equal_to (const Variable &v) const |
Checks the equality of two variables based on their ID values. | |
bool | less (const Variable &v) const |
Compares two variables based on their ID values. | |
Private Attributes | |
Id | id_ {} |
Unique identifier. | |
Type | type_ {Type::CONTINUOUS} |
Type of variable. | |
Static Private Attributes | |
static std::vector< std::string > | names_ |
Names of variables. | |
Represents a symbolic variable.
Definition at line 15 of file symbolic_variable.h.
|
strong |
Supported types of symbolic variables.
Definition at line 20 of file symbolic_variable.h.
|
inline |
Default constructor.
Constructs a dummy variable of CONTINUOUS type. This is needed to have Eigen::Matrix<Variable>. The objects created by the default constructor share the same ID, zero. As a result, they all are identified as a single variable by equality operator (==). They all 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 41 of file symbolic_variable.h.
|
explicit |
Constructs a variable with a string.
If not specified, it has CONTINUOUS type by default.