3 #include <boost/bimap.hpp>     4 #include <boost/bimap/set_of.hpp>     5 #include <boost/bimap/unordered_set_of.hpp>    21     template <
typename StateNameset, 
typename Stateset,
    31     template <
typename StateNameset, 
typename Stateset>
    39       using state_t = 
typename stateset_t::value_t;
    47       using right_t = boost::bimaps::set_of<state_t>;
    49       using bimap_t = boost::bimap<left_t, right_t>;
    56       template <
typename... Args>
    59         return map_.insert({ std::forward<Args>(args)... });
    64         return map_.left.find(s);
    69         return map_.left.end();
   102     template <
typename StateNameset, 
typename Stateset>
   121       template <
typename... Args>
   124         return map_.emplace(std::forward<Args>(args)...);
   129         return map_.find(sn);
   154         if (origins_.empty())
   155           for (
const auto& p: map_)
   156             origins_.emplace(p.second, p.first);
 const origins_t & origins() const
 
typename bimap_t::const_iterator const_iterator
 
typename stateset_t::value_t state_t
 
std::map< state_t, state_name_t > origins_t
A map from state indexes to state names. 
 
auto find_key(const state_name_t &sn) const
 
static const state_name_t & state_name(const const_iterator &i)
Get the state name from a const_iterator. 
 
static state_t state(const const_iterator &i)
Get the state from a const_iterator. 
 
auto emplace(Args &&... args)
Insert a new state. 
 
static state_t state(const const_iterator &i)
Get the state from a const_iterator. 
 
const origins_t & origins() const
 
typename state_nameset_t::value_t state_name_t
 
boost::bimaps::set_of< state_t > right_t
Storage for state index. 
 
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
 
std::unordered_map< state_name_t, state_t, vcsn::hash< state_nameset_t >, vcsn::equal_to< state_nameset_t > > map_t
 
typename state_nameset_t::value_t state_name_t
 
boost::bimap< left_t, right_t > bimap_t
Bidirectional map state_name_t -> state_t;. 
 
auto find_key(const state_name_t &s) const
 
boost::bimaps::unordered_set_of< state_name_t, vcsn::hash< state_nameset_t >, vcsn::equal_to< state_nameset_t > > left_t
Storage for state names. 
 
typename map_t::const_iterator const_iterator
 
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
 
StateNameset state_nameset_t
 
StateNameset state_nameset_t
 
static const state_name_t & state_name(const const_iterator &i)
Get the state name from a const_iterator. 
 
A bidirectional map from state names to state numbers. 
 
typename stateset_t::value_t state_t
 
auto emplace(Args &&... args)
Insert a new state. 
 
typename bimap_t::right_map origins_t
A map from state indexes to state names. 
 
Request the unordered_map implementation.