60 requires isEpsilonNFA < T > || isEpsilonNFTA < T >
74 requires isDFA < T > || isNFA < T > || isMultiInitialStateNFA < T >
88 template <
class SymbolType,
class StateType >
102 template <
class SymbolType,
class StateType >
105 template <
class SymbolType,
class StateType >
110requires isEpsilonNFA < T > || isEpsilonNFTA < T >
114 Qi.push_back ( { } );
116 Qi.at ( 0 ) [ state ].insert ( state );
120 Qi.push_back (
Qi.at (
i - 1 ) );
123 for (
const typename T::StateType & pclosure : p.second )
124 for (
const auto & transition : fsm.getEpsilonTransitionsFromState ( pclosure ) )
125 Qi.at (
i ) [ p.first ].insert ( transition.second );
127 if (
Qi.at (
i ) ==
Qi.at (
i - 1 ) )
137requires isDFA < T > || isNFA < T > || isMultiInitialStateNFA < T >
140 for (
const typename T::StateType & state : fsm.getStates ( ) )
141 closure [ state ].insert ( state );
145template <
class SymbolType,
class StateType >
152 step[transition.first.first].
insert(transition.second);
155 step[state].
insert(state);
163 }
while(
res != step);
168template <
class SymbolType,
class StateType >
174 if( transition.first.second.empty ( ) )
175 step[transition.first.first].
insert(transition.second);
178 step[state].
insert(state);
186 }
while(
res != step);
191template <
class SymbolType,
class StateType >
197 if ( fsm.
getStates ( ).contains ( transition.first.first ) && transition.first.second.empty ( ) )
198 step [ transition.first.first.template get < StateType > ( ) ].
insert ( transition.second );
201 step[state].
insert(state);
209 }
while(
res != step);
Compact nondeterministic finite automaton. Accepts regular languages. The automaton has a list of sym...
Definition: CompactNFA.h:78
const ext::multimap< ext::pair< StateType, ext::vector< SymbolType > >, StateType > & getTransitions() const &
Definition: CompactNFA.h:555
const ext::set< StateType > & getStates() const &
Definition: CompactNFA.h:183
Extended nondeterministic finite automaton. Accepts regular languages. The automaton has a regular ex...
Definition: ExtendedNFA.h:80
const ext::multimap< ext::pair< StateType, regexp::UnboundedRegExpStructure< SymbolType > >, StateType > & getTransitions() const &
Definition: ExtendedNFA.h:581
const ext::set< StateType > & getStates() const &
Definition: ExtendedNFA.h:185
Nondeterministic Z-Automaton. Computation model for unranked regular tree languages.
Definition: NondeterministicZAutomaton.h:68
const ext::multimap< ext::pair< ext::variant< SymbolType, StateType >, ext::vector< ext::variant< SymbolType, StateType > > >, StateType > & getTransitions() const &
Definition: NondeterministicZAutomaton.h:283
const ext::set< StateType > & getStates() const &
Definition: NondeterministicZAutomaton.h:99
Definition: AllEpsilonClosure.h:49
static ext::map< typename T::StateType, ext::set< typename T::StateType > > allEpsilonClosure(const T &fsm)
static ext::map< typename T::StateType, ext::set< typename T::StateType > > allEpsilonClosure(const T &fsm)
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
std::pair< iterator, bool > insert(const T &key, const R &value)
Insert variant with explicit key and value parameters.
Definition: map.hpp:118
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Implementation of the variant class allowing to store any type of those listed in the template parame...
Definition: variant.hpp:98
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: UnboundedRegExpStructure.h:47
static bool languageContainsEpsilon(const regexp::FormalRegExpElement< SymbolType > ®exp)
Definition: RegExpEpsilon.h:91
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
int i
Definition: AllEpsilonClosure.h:118
return closure
Definition: AllEpsilonClosure.h:142
ext::deque< ext::set< StateType > > Qi
Definition: ReachableStates.h:95
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
void end()
Definition: measurements.cpp:19