Identifier for a symbolic variable.
Variable equality is defined by whether their Ids are equal (i.e., ignoring Variable names). Ids are akin to UUIDs because Ids contain a large number of random bits so are unique not only within a single process, but also across multiple runs of programs over time. On the other hand, we also guarantee that all Ids created within a single process have consistent behavior in their comparison (operator<) and hashing operators, so that any single program is still run-to-run consistent.
#include <drake/common/symbolic/expression/variable.h>
Public Member Functions | |
| Id ()=default | |
| Constructs a "dummy" id, not associated with any variable. | |
| auto | operator<=> (const Id &) const =default |
| Default comparison operators. | |
| std::string | to_string () const |
| Returns a string representation of this Id. | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| Id (const Id &)=default | |
| Id & | operator= (const Id &)=default |
| Id (Id &&)=default | |
| Id & | operator= (Id &&)=default |
Friends | |
| class | Variable |
| class | VariableIdPythonAttorney |
| template<class HashAlgorithm> | |
| void | hash_append (HashAlgorithm &hasher, const Id &item) noexcept |
| Implements the hash_append generic hashing concept. | |
|
default |
|
default |
|
default |
Constructs a "dummy" id, not associated with any variable.
|
default |
Default comparison operators.
| std::string to_string | ( | ) | const |
Returns a string representation of this Id.
|
friend |
Implements the hash_append generic hashing concept.
|
friend |
|
friend |