Vcsn  2.2
Be Rational
vcsn::detail::state_bimap< StateNameset, Stateset, true > 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, true >:

Public Types

using const_iterator = typename bimap_t::const_iterator
 
using origins_t = typename bimap_t::right_map
 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 &s) 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...
 

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 left_t = boost::bimaps::unordered_set_of< state_name_t, vcsn::hash< state_nameset_t >, vcsn::equal_to< state_nameset_t >>
 Storage for state names. More...
 
using right_t = boost::bimaps::set_of< state_t >
 Storage for state index. More...
 
using bimap_t = boost::bimap< left_t, right_t >
 Bidirectional map state_name_t -> state_t;. More...
 

Private Attributes

bimap_t map_
 

Detailed Description

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

A bidirectional map from state names to state numbers.

The lazy case: maintain the origins() map constantly.

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

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

Member Typedef Documentation

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, true >::bimap_t = boost::bimap<left_t, right_t>
private

Bidirectional map state_name_t -> state_t;.

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

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, true >::const_iterator = typename bimap_t::const_iterator

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

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, true >::left_t = boost::bimaps::unordered_set_of<state_name_t, vcsn::hash<state_nameset_t>, vcsn::equal_to<state_nameset_t>>
private

Storage for state names.

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

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, true >::origins_t = typename bimap_t::right_map

A map from state indexes to state names.

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

template<typename StateNameset , typename Stateset >
using vcsn::detail::state_bimap< StateNameset, Stateset, true >::right_t = boost::bimaps::set_of<state_t>
private

Storage for state index.

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

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

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

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

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

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

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

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

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

Member Function Documentation

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

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

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

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

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

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

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

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

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

Get the state from a const_iterator.

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

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

Get the state name from a const_iterator.

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

Member Data Documentation

template<typename StateNameset , typename Stateset >
bimap_t vcsn::detail::state_bimap< StateNameset, Stateset, true >::map_
private

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


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