Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <EpsilonClosure.h>
Static Public Member Functions | |
template<class SymbolType , class StateType > | |
static ext::set< StateType > | epsilonClosure (const automaton::EpsilonNFA< SymbolType, StateType > &fsm, const StateType &q) |
template<class SymbolType , class StateType > | |
static ext::set< StateType > | epsilonClosure (const automaton::EpsilonNFTA< SymbolType, StateType > &fta, const StateType &q) |
template<class T > requires isDFA < T > || isNFA < T > || isMultiInitialStateNFA < T > | |
static ext::set< typename T::StateType > | epsilonClosure (const T &fsm, const typename T::StateType &q) |
template<class SymbolType , class StateType > | |
static ext::set< StateType > | epsilonClosure (const automaton::ExtendedNFA< SymbolType, StateType > &fsm, const StateType &q) |
template<class SymbolType , class StateType > | |
static ext::set< StateType > | epsilonClosure (const automaton::CompactNFA< SymbolType, StateType > &fsm, const StateType &q) |
Algorithm computing an epsilon closure of a single state in a finite automaton.
|
static |
Computes epsilon closure for a state of an compact nondeterministic finite automaton. Any string of size 0 is considered as epsilon.
SymbolType | Type for the input symbols. |
StateType | Type for the states. |
fsm | compact nondeterministic finite automaton |
state | state for which we want to compute the closure |
state
of fsm
exception::CommonException | if state is not in the set of fsm states |
|
static |
Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions. Implemented using breadth-first search.
SymbolType | Type for the input symbols. |
StateType | Type for the states. |
fsm | nondeterministic finite automaton with epsilon transitions |
state | state for which we want to compute the closure |
state
of fsm
exception::CommonException | if state is not in the set of fsm states |
|
static |
Computes epsilon closure for a state of a nondeterministic finite tree automaton with epsilon transitions. Implemented using breadth-first search.
SymbolType | Type for the input symbols. |
StateType | Type for the states. |
fsm | nondeterministic finite tree automaton with epsilon transitions |
state | state for which we want to compute the closure |
state
of fsm
exception::CommonException | if state is not in the set of fsm states |
|
static |
Computes epsilon closure for a state of an extended nondeterministic finite automaton. Any regexp that can denote epsilon word is considered as an epsilon transition for the purpose of this algorithm.
SymbolType | Type for the input symbols. |
StateType | Type for the states. |
fsm | extended nondeterministic finite automaton |
state | state for which we want to compute the closure |
state
of fsm
exception::CommonException | if state is not in the set of fsm states |
|
static |
Computes epsilon closure for given states of a nondeterministic finite automaton with multiple initial states. Epsilon closure of a state q of an automaton without epsilon transitions is eps-closure(q) = {q}.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
T | type of tested automaton. |
fsm | (nondeterministic) finite automaton (with multiple initial states) |
state | state for which we want to compute the closure |
fsm