18 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_BMIG_GRAPHCONTAINER_HH_
19 # define VCSN_AUTOMATA_IMPLEMENTATION_BMIG_GRAPHCONTAINER_HH_
21 # include <vaucanson/misc/hash.hh>
22 # include <vaucanson/automata/implementation/bmig/edge_value.hh>
23 # include <boost/multi_index_container.hpp>
24 # include <boost/multi_index/member.hpp>
25 # include <boost/multi_index/ordered_index.hpp>
26 # include <boost/multi_index/hashed_index.hpp>
27 # include <boost/functional/hash/hash.hpp>
28 # include <boost/multi_index/sequenced_index.hpp>
29 # include <boost/tuple/tuple.hpp>
30 # include <boost/multi_index/composite_key.hpp>
36 using ::boost::multi_index_container;
37 using ::boost::multi_index::hashed_non_unique;
38 using ::boost::multi_index::indexed_by;
39 using ::boost::multi_index::composite_key;
40 using ::boost::multi_index::hashed_non_unique;
41 using ::boost::multi_index::tag;
42 using ::boost::multi_index::member;
43 using ::boost::multi_index::index_iterator;
45 using ::boost::multi_index::project;
46 using ::boost::multi_index::composite_key_hash;
59 template<
typename State,
typename HLabel,
typename EdgeValue>
60 struct SuccessorKey : composite_key <
62 BOOST_MULTI_INDEX_MEMBER(EdgeValue, State, from_),
63 BOOST_MULTI_INDEX_MEMBER(EdgeValue, HLabel, label_)
67 template<
typename State,
typename HLabel,
typename EdgeValue>
68 struct PredecessorKey : composite_key <
70 BOOST_MULTI_INDEX_MEMBER(EdgeValue, State, to_),
71 BOOST_MULTI_INDEX_MEMBER(EdgeValue, HLabel, label_)
75 template<
typename State,
typename HLabel,
typename EdgeValue>
76 struct SourceAndLabel :
public hashed_non_unique <
78 SuccessorKey<State, HLabel, EdgeValue>,
80 vcsn::misc::hash_state_handler,
81 vcsn::misc::hash_label<HLabel>
86 template<
typename State,
typename HLabel,
typename EdgeValue>
87 struct DestinationAndLabel :
public hashed_non_unique <
89 PredecessorKey<State, HLabel, EdgeValue>,
91 vcsn::misc::hash_state_handler,
92 vcsn::misc::hash_label<HLabel>
99 template<
typename State,
typename EdgeValue>
100 struct Source :
public hashed_non_unique <
102 BOOST_MULTI_INDEX_MEMBER(EdgeValue, State, from_),
103 vcsn::misc::hash_state_handler
108 template<
typename State,
typename EdgeValue>
109 struct Destination :
public hashed_non_unique <
111 BOOST_MULTI_INDEX_MEMBER(EdgeValue, State, to_),
112 vcsn::misc::hash_state_handler
129 template<
typename State,
typename HLabel,
typename EdgeValue>
131 :
public multi_index_container
136 SourceAndLabel<State, HLabel, EdgeValue>,
137 DestinationAndLabel<State, HLabel, EdgeValue>,
138 Source<State, EdgeValue>,
139 Destination<State, EdgeValue>
146 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_BMIG_GRAPHCONTAINER_HH_