51 template <
class SymbolType,
class StateType1,
class StateType2 >
55template <
class SymbolType,
class StateType1,
class StateType2 >
57 std::queue < ext::pair < StateType1, StateType2 > > queue;
65 while ( !queue.empty ( ) ) {
69 if ( ! Q.count ( state ) ) {
74 if (
second.getFinalStates ( ).count ( state.second ) )
78 for(
const auto & tq :
second.getTransitionsFromState ( state.second ) )
79 if(tp.first.second == tq.first.second) {
91 res.addInputSymbols(
second.getInputAlphabet());
97 res.addTransition ( transitions.first.first, transitions.first.second, std::move ( to ) );
100 res.setInitialStates ( Q0 );
101 res.setFinalStates ( F );
Nondeterministic finite automaton with multiple initial states. Accepts regular languages.
Definition: MultiInitialStateNFA.h:69
Nondeterministic finite automaton. Accepts regular languages.
Definition: NFA.h:66
const StateType & getInitialState() const &
Definition: NFA.h:107
const ext::set< SymbolType > & getInputAlphabet() const &
Definition: NFA.h:234
const ext::set< StateType > & getFinalStates() const &
Definition: NFA.h:185
auto getTransitionsFromState(const StateType &from) const
Definition: NFA.h:494
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
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: ToGrammar.h:31
reference_mover< T > make_mover(T ¶m)
Move adaptor construction function specialized to lvalue reference parameter.
Definition: iterator.hpp:468
ContainerType< ResType > transform(const ContainerType< InType, Ts ... > &in, Callback transform)
In container tranformation of all elements according to the tranform.
Definition: algorithm.hpp:150
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79