claw 1.9.0
 
Loading...
Searching...
No Matches
claw::automaton< State, Edge, StateComp, EdgeComp > Class Template Reference

Basic automaton structure. More...

#include <automaton.hpp>

Public Types

typedef State state_type
 The type of the states.
 
typedef Edge edge_type
 The type of the symbols on the edges.
 
typedef StateComp state_compare
 The type of the operator used to compare states.
 
typedef EdgeComp edge_compare
 The type of the operator used to compare edge symbols.
 
typedef std::multimap< edge_type, state_type, edge_compareneighbours_list
 The neighbours list associates states to edge symbols.
 
typedef std::map< state_type, neighbours_list, state_compareadjacent_list
 Each state is given a set of reachable states with a neighbours list.
 
typedef std::vector< state_typeresult_state_list
 The return type of the methods returning states.
 
typedef std::vector< edge_typeresult_edge_list
 The return type of the methods returning edges.
 

Public Member Functions

void add_edge (const state_type &s1, const state_type &s2, const edge_type &e)
 
void remove_edge (const state_type &s1, const state_type &s2, const edge_type &e)
 
void add_state (const state_type &s)
 
void add_initial_state (const state_type &s)
 
void add_final_state (const state_type &s)
 
bool state_exists (const state_type &s) const
 
bool state_is_final (const state_type &s) const
 
bool state_is_initial (const state_type &s) const
 
void states (result_state_list &v) const
 
void final_states (result_state_list &v) const
 
void initial_states (result_state_list &v) const
 
void alphabet (result_edge_list &v) const
 
template<class InputIterator>
bool match (InputIterator first, InputIterator last) const
 
unsigned int states_count () const
 
void reachables (const state_type &s, const edge_type &e, result_state_list &l) const
 
void reachables (const state_type &s, result_state_list &l) const
 
void edges (const state_type &s1, const state_type &s2, result_edge_list &l) const
 
void edges (const state_type &s1, const edge_type &edge, result_edge_list &l) const
 

Detailed Description

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
class claw::automaton< State, Edge, StateComp, EdgeComp >

Basic automaton structure.

An automaton is a quintuplet (A, E, I ,F, T) where

  • A is the set of symbols,
  • E is the set of states,
  • I is the set of initial states,
  • F is the set of finalstates,
  • T is the set of transitions (labeled edges)

Template parameters

  • State The type of the states.
  • Edge The type of the symbols in the alphabet.

Definition at line 57 of file automaton.hpp.

Member Typedef Documentation

◆ adjacent_list

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef std::map<state_type, neighbours_list, state_compare> claw::automaton< State, Edge, StateComp, EdgeComp >::adjacent_list

Each state is given a set of reachable states with a neighbours list.

Definition at line 77 of file automaton.hpp.

◆ edge_compare

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef EdgeComp claw::automaton< State, Edge, StateComp, EdgeComp >::edge_compare

The type of the operator used to compare edge symbols.

Definition at line 70 of file automaton.hpp.

◆ edge_type

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef Edge claw::automaton< State, Edge, StateComp, EdgeComp >::edge_type

The type of the symbols on the edges.

Definition at line 64 of file automaton.hpp.

◆ neighbours_list

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef std::multimap<edge_type, state_type, edge_compare> claw::automaton< State, Edge, StateComp, EdgeComp >::neighbours_list

The neighbours list associates states to edge symbols.

Definition at line 73 of file automaton.hpp.

◆ result_edge_list

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef std::vector<edge_type> claw::automaton< State, Edge, StateComp, EdgeComp >::result_edge_list

The return type of the methods returning edges.

Definition at line 83 of file automaton.hpp.

◆ result_state_list

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef std::vector<state_type> claw::automaton< State, Edge, StateComp, EdgeComp >::result_state_list

The return type of the methods returning states.

Definition at line 80 of file automaton.hpp.

◆ state_compare

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef StateComp claw::automaton< State, Edge, StateComp, EdgeComp >::state_compare

The type of the operator used to compare states.

Definition at line 67 of file automaton.hpp.

◆ state_type

template<class State, class Edge, class StateComp = std::less<State>, class EdgeComp = std::less<Edge>>
typedef State claw::automaton< State, Edge, StateComp, EdgeComp >::state_type

The type of the states.

Definition at line 61 of file automaton.hpp.


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