6#include <ext/algorithm> 
   14namespace determinize {
 
   16template < 
class InputSymbolType, 
class PushdownSymbolType, 
class StateType >
 
   29    todo.push_back ( std::move ( initialState ) );
 
   43                for ( 
auto & transition : 
range )
 
   44                    dfaState.insert ( transition.second );
 
   48            bool existed = !
res.addState ( dfaState );
 
   50            if ( !existed ) todo.push_back ( dfaState );
 
   53            res.addTransition ( state, input, std::move ( dfaState ) );
 
   55    } 
while ( !todo.empty ( ) );
 
   60        if ( ! 
ext::excludes ( finalLabels.
begin ( ), finalLabels.
end ( ), dfaState.begin ( ), dfaState.end ( ) ) )
 
   61            res.addFinalState ( dfaState );
 
static automaton::DFA< SymbolType, StateType > determinize(const automaton::DFA< SymbolType, StateType > &automaton)
Definition: Determinize.h:276
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: set.hpp:99
auto end() &
Inherited behavior of end for non-const instance.
Definition: set.hpp:129
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
auto range(Container &&cont) -> decltype(std::forward< Container >(cont).range())
Definition: range.hpp:247
bool excludes(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp)
Tests two sorted ranges wheter all elements from the second are not present in the first.
Definition: algorithm.hpp:46
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79