51 template <
class SymbolType,
class StateType1,
class StateType2 >
57 template <
class SymbolType,
class StateType1,
class StateType2 >
63 template <
class SymbolType,
class StateType1,
class StateType2 >
67template <
class SymbolType,
class StateType1,
class StateType2 >
73 res.addInputSymbol(a);
74 for(
const auto& a :
second.getInputAlphabet())
75 res.addInputSymbol(a);
78 for(
const auto&
q :
second.getStates())
82 for(
const auto&
q :
second.getFinalStates())
87 for(
const auto & tq :
second.getTransitionsFromState ( state.second ) )
88 if(tp.first.second == tq.first.second)
89 res.addTransition ( state, tp.first.second,
ext::make_pair ( tp.second, tq.second ) );
94template <
class SymbolType,
class StateType1,
class StateType2 >
100 res.addInputSymbol(a);
101 for(
const auto& a :
second.getInputAlphabet())
102 res.addInputSymbol(a);
105 for(
const auto&
q :
second.getStates())
109 for(
const auto&
q :
second.getFinalStates())
114 for(
const auto & tq :
second.getTransitionsFromState ( state.second ) )
115 if(tp.first.second == tq.first.second)
116 res.addTransition ( state, tp.first.second,
ext::make_pair ( tp.second, tq.second ) );
121template <
class SymbolType,
class StateType1,
class StateType2 >
126 res.addInputSymbol(a);
127 for(
const auto& a :
second.getInputAlphabet())
128 res.addInputSymbol(a);
131 for(
const auto&
q :
second.getStates())
135 for(
const auto&
q :
second.getFinalStates())
139 for(
const auto & tq :
second.getTransitions ( ) )
140 if(tp.first.first == tq.first.first) {
143 source.push_back (
ext::make_pair ( std::get < 0 > ( singleSourceState ), std::get < 1 > ( singleSourceState ) ) );
145 res.addTransition ( tp.first.first, source,
ext::make_pair ( tp.second, tq.second ) );
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
const ext::set< StateType > & getFinalStates() const &
Definition: DFA.h:183
const StateType & getInitialState() const &
Definition: DFA.h:105
const ext::set< SymbolType > & getInputAlphabet() const &
Definition: DFA.h:232
const ext::set< StateType > & getStates() const &
Definition: DFA.h:134
ext::iterator_range< typename ext::map< ext::pair< StateType, SymbolType >, StateType >::const_iterator > getTransitionsFromState(const StateType &from) const
Definition: DFA.h:483
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: DFTA.h:74
const ext::map< ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > >, StateType > & getTransitions() const &
Definition: DFTA.h:289
const ext::set< common::ranked_symbol< SymbolType > > & getInputAlphabet() const &
Definition: DFTA.h:203
const ext::set< StateType > & getFinalStates() const &
Definition: DFTA.h:154
const ext::set< StateType > & getStates() const &
Definition: DFTA.h:105
Nondeterministic finite automaton. Accepts regular languages.
Definition: NFA.h:66
const ext::set< StateType > & getStates() const &
Definition: NFA.h:136
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 pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
q
Definition: SingleInitialStateEpsilonTransition.h:85
StateType q0
Definition: SingleInitialState.h:96
Definition: ToGrammar.h:31
const_tuple_foreach< Types ... > make_tuple_foreach(const Types &... args)
Function construction of foreach tuple pack helper.
Definition: foreach.hpp:280
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