|
| DFA (StateType initialState) |
| Creates a new instance of the automaton with a concrete initial state. More...
|
|
| DFA (ext::set< StateType > states, ext::set< SymbolType > inputAlphabet, StateType initialState, ext::set< StateType > finalStates) |
| Creates a new instance of the automaton with a concrete set of states, input alphabet, initial state, and a set of final states. More...
|
|
const StateType & | getInitialState () const & |
|
StateType && | getInitialState () && |
|
bool | setInitialState (StateType state) |
|
const ext::set< StateType > & | getStates () const & |
|
ext::set< StateType > && | getStates () && |
|
bool | addState (StateType state) |
|
void | setStates (ext::set< StateType > states) |
|
void | removeState (const StateType &state) |
|
const ext::set< StateType > & | getFinalStates () const & |
|
ext::set< StateType > && | getFinalStates () && |
|
bool | addFinalState (StateType state) |
|
void | setFinalStates (ext::set< StateType > states) |
|
void | removeFinalState (const StateType &state) |
|
const ext::set< SymbolType > & | getInputAlphabet () const & |
|
ext::set< SymbolType > && | getInputAlphabet () && |
|
bool | addInputSymbol (SymbolType symbol) |
|
void | addInputSymbols (ext::set< SymbolType > symbols) |
|
void | setInputAlphabet (ext::set< SymbolType > symbols) |
|
void | removeInputSymbol (const SymbolType &symbol) |
|
bool | addTransition (StateType from, SymbolType input, StateType to) |
| Add a transition to the automaton. More...
|
|
bool | removeTransition (const StateType &from, const SymbolType &input, const StateType &to) |
| Removes a transition from the automaton. More...
|
|
const ext::map< ext::pair< StateType, SymbolType >, StateType > & | getTransitions () const & |
|
ext::map< ext::pair< StateType, SymbolType >, StateType > && | getTransitions () && |
|
ext::iterator_range< typename ext::map< ext::pair< StateType, SymbolType >, StateType >::const_iterator > | getTransitionsFromState (const StateType &from) const |
|
ext::map< ext::pair< StateType, SymbolType >, StateType > | getTransitionsToState (const StateType &to) const |
|
bool | isTotal () const |
| Determines whether the automaton is total. More...
|
|
auto | operator<=> (const DFA &other) const |
|
bool | operator== (const DFA &other) const |
|
void | accessComponent () |
|
template<class SymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
class automaton::DFA< SymbolTypeT, StateTypeT >
Deterministic finite automaton. Accepts regular languages.
Definition is classical definition of finite automata. A = (Q, T, I, \delta, F), Q (States) = nonempty finite set of states, T (TerminalAlphabet) = finite set of terminal symbols - having this empty won't let automaton do much though, I (InitialState) = initial state, \delta = transition function of the form A \times a -> B, where A, B \in Q and a \in T, F (FinalStates) = set of final states
Note that target state of a transition is required. This class is used to store minimal, total, ... variants of deterministic finite automata.
- Template Parameters
-
SymbolTypeT | used for the terminal alphabet |
StateTypeT | used to the states, and the initial state of the automaton. |