30 #ifndef __CLAW_AUTOMATON_HPP__ 31 #define __CLAW_AUTOMATON_HPP__ 55 template<
class State,
class Edge,
class StateComp = std::less<State>,
56 class EdgeComp = std::less<Edge> >
77 typedef std::map<state_type, neighbours_list, state_compare>
adjacent_list;
95 bool state_exists(
const state_type& s )
const;
96 bool state_is_final(
const state_type& s )
const;
97 bool state_is_initial(
const state_type& s )
const;
104 template<
class InputIterator>
105 bool match(InputIterator
first, InputIterator last)
const;
107 unsigned int states_count()
const;
120 template<
class InputIterator>
122 InputIterator last)
const;
143 #include <claw/impl/automaton.tpp> 145 #endif // __CLAW_AUTOMATON_HPP__
std::multimap< edge_type, state_type, edge_compare > neighbours_list
The neighbours list associates states to edge symbols.
EdgeComp edge_compare
The type of the operator used to compare edge symbols.
Edge edge_type
The type of the symbols on the edges.
std::map< state_type, neighbours_list, state_compare > adjacent_list
Each state is given a set of reachable states with a neighbours list.
StateComp state_compare
The type of the operator used to compare states.
Fuction object to get the first element of a std::pair.
std::vector< state_type > result_state_list
The return type of the methods returning states.
Basic automaton structure.
State state_type
The type of the states.
std::vector< edge_type > result_edge_list
The return type of the methods returning edges.
This is the main namespace.