Vcsn
2.4
Be Rational
|
A bidirectional map from state names to state numbers. More...
#include <state-bimap.hh>
Public Types | |
using | state_nameset_t = StateNameset |
using | state_name_t = typename state_nameset_t::value_t |
using | stateset_t = Stateset |
using | state_t = typename stateset_t::value_t |
using | map_t = std::unordered_map< state_name_t, state_t, vcsn::hash< state_nameset_t >, vcsn::equal_to< state_nameset_t >> |
using | const_iterator = typename map_t::const_iterator |
using | origins_t = std::map< state_t, state_name_t > |
A map from state indexes to state names. More... | |
Public Member Functions | |
template<typename... Args> | |
auto | emplace (Args &&...args) |
Insert a new state. More... | |
auto | find_key (const state_name_t &sn) const |
auto | end_key () const |
const origins_t & | origins () const |
Static Public Member Functions | |
static const state_name_t & | state_name (const const_iterator &i) |
Get the state name from a const_iterator. More... | |
static state_t | state (const const_iterator &i) |
Get the state from a const_iterator. More... | |
Public Attributes | |
origins_t | origins_ |
Private Attributes | |
map_t | map_ |
A bidirectional map from state names to state numbers.
The strict case: compute origins() just once, at the end.
StateNameset | a valueset to manipulate the state names. |
Stateset | a valueset to manipulate the state indexes. |
Definition at line 103 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::const_iterator = typename map_t::const_iterator |
Definition at line 116 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::map_t = std::unordered_map<state_name_t, state_t, vcsn::hash<state_nameset_t>, vcsn::equal_to<state_nameset_t>> |
Definition at line 114 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::origins_t = std::map<state_t, state_name_t> |
A map from state indexes to state names.
Definition at line 150 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_name_t = typename state_nameset_t::value_t |
Definition at line 107 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_nameset_t = StateNameset |
Definition at line 106 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_t = typename stateset_t::value_t |
Definition at line 110 of file state-bimap.hh.
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::stateset_t = Stateset |
Definition at line 109 of file state-bimap.hh.
|
inline |
Insert a new state.
Pass a "pair" state-name -> state.
Definition at line 122 of file state-bimap.hh.
|
inline |
Definition at line 132 of file state-bimap.hh.
|
inline |
Definition at line 127 of file state-bimap.hh.
|
inline |
Definition at line 152 of file state-bimap.hh.
|
inlinestatic |
Get the state from a const_iterator.
Definition at line 144 of file state-bimap.hh.
|
inlinestatic |
Get the state name from a const_iterator.
Definition at line 138 of file state-bimap.hh.
|
private |
Definition at line 161 of file state-bimap.hh.
|
mutable |
Definition at line 151 of file state-bimap.hh.