Vcsn  2.2
Be Rational
vcsn::detail::state_bimap< StateNameset, Stateset, false > Class Template Reference

A bidirectional map from state names to state numbers. More...

#include <polystate-automaton.hh>

Collaboration diagram for vcsn::detail::state_bimap< StateNameset, Stateset, false >:

Public Types

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)
 
auto find_key (const state_name_t &sn) const
 
auto end_key () const
 
const origins_torigins () const
 

Static Public Member Functions

static const state_name_tstate_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 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 >>
 

Private Attributes

map_t map_
 

Detailed Description

template<typename StateNameset, typename Stateset>
class vcsn::detail::state_bimap< StateNameset, Stateset, false >

A bidirectional map from state names to state numbers.

The strict case: compute origins() just once, at the end.

Template Parameters
StateNameseta valueset to manipulate the state names.
Stateseta valueset to manipulate the state indexes.

Definition at line 105 of file polystate-automaton.hh.

Member Typedef Documentation

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::const_iterator = typename map_t::const_iterator

Definition at line 119 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
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>>
private

Definition at line 115 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
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 polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_name_t = typename state_nameset_t::value_t
private

Definition at line 108 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_nameset_t = StateNameset
private

Definition at line 107 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_t = typename stateset_t::value_t
private

Definition at line 111 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, false >::stateset_t = Stateset
private

Definition at line 110 of file polystate-automaton.hh.

Member Function Documentation

template<typename StateNameset , typename Stateset >
template<typename... Args>
auto vcsn::detail::state_bimap< StateNameset, Stateset, false >::emplace ( Args &&...  args)
inline

Definition at line 122 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
auto vcsn::detail::state_bimap< StateNameset, Stateset, false >::end_key ( ) const
inline

Definition at line 132 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
auto vcsn::detail::state_bimap< StateNameset, Stateset, false >::find_key ( const state_name_t sn) const
inline

Definition at line 127 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
const origins_t& vcsn::detail::state_bimap< StateNameset, Stateset, false >::origins ( ) const
inline

Definition at line 152 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
static state_t vcsn::detail::state_bimap< StateNameset, Stateset, false >::state ( const const_iterator i)
inlinestatic

Get the state from a const_iterator.

Definition at line 144 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
static const state_name_t& vcsn::detail::state_bimap< StateNameset, Stateset, false >::state_name ( const const_iterator i)
inlinestatic

Get the state name from a const_iterator.

Definition at line 138 of file polystate-automaton.hh.

Member Data Documentation

template<typename StateNameset , typename Stateset >
map_t vcsn::detail::state_bimap< StateNameset, Stateset, false >::map_
private

Definition at line 116 of file polystate-automaton.hh.

template<typename StateNameset , typename Stateset >
origins_t vcsn::detail::state_bimap< StateNameset, Stateset, false >::origins_
mutable

Definition at line 151 of file polystate-automaton.hh.


The documentation for this class was generated from the following file: