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;
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;
119 template <
class InputIterator>
121 InputIterator last)
const;
142#include <claw/automaton.tpp>
Basic automaton structure.
State state_type
The type of the states.
Edge edge_type
The type of the symbols on the edges.
EdgeComp edge_compare
The type of the operator used to compare edge symbols.
StateComp state_compare
The type of the operator used to compare states.
std::vector< edge_type > result_edge_list
The return type of the methods returning edges.
std::vector< state_type > result_state_list
The return type of the methods returning states.
std::multimap< edge_type, state_type, edge_compare > neighbours_list
The neighbours list associates states to edge symbols.
std::map< state_type, neighbours_list, state_compare > adjacent_list
Each state is given a set of reachable states with a neighbours list.
Binary search tree AVL implementation.
Fuction object to get the first element of a std::pair.
This is the main namespace.