mCRL2
|
For several variable types in mCRL2 an implicit mapping of these variables to integers is available. This is done for efficiency reasons. Examples are: More...
#include <index_traits.h>
Static Public Member Functions | |
static std::size_t | index (const Variable &x) |
Returns the index of the variable. | |
static std::size_t | max_index () |
Returns an upper bound for the largest index of a variable that is currently in use. | |
static std::size_t | insert (const KeyType &x) |
Note: intended for internal use only! Returns the index of the variable. If the variable was not already in the map, it is added. | |
static void | erase (const KeyType &x) |
Note: intended for internal use only! Removes the variable from the index map. | |
static std::size_t | size () |
Note: intended for internal use only! Provides the size of the variable index map. | |
For several variable types in mCRL2 an implicit mapping of these variables to integers is available. This is done for efficiency reasons. Examples are:
data::variable, process::process_identifier
The class index_traits is used to implement this mapping. A traits class was chosen to prevent pollution of the public interface of the classes that represent these variables.
N is the position of the index in the aterm.
Definition at line 63 of file index_traits.h.
|
inlinestatic |
Note: intended for internal use only! Removes the variable from the index map.
Definition at line 118 of file index_traits.h.
|
inlinestatic |
Returns the index of the variable.
Definition at line 69 of file index_traits.h.
|
inlinestatic |
Note: intended for internal use only! Returns the index of the variable. If the variable was not already in the map, it is added.
Definition at line 85 of file index_traits.h.
|
inlinestatic |
Returns an upper bound for the largest index of a variable that is currently in use.
Definition at line 77 of file index_traits.h.
|
inlinestatic |
Note: intended for internal use only! Provides the size of the variable index map.
Definition at line 135 of file index_traits.h.