25 template <
class SymbolType >
28 template <
class SymbolType >
33 template <
class SymbolType >
36 template <
class SymbolType >
39 template <
class SymbolType >
51 template <
class SymbolType >
54 template <
class SymbolType >
67template <
class SymbolType >
83 if ( depth == input.size ( ) )
84 ret.push_back ( current );
86 for (
size_t i = 0;
i < input[depth].size ( );
i++ ) {
87 current[depth] = input[depth][
i];
88 cartesian_rec ( input,
ret, current, depth + 1 );
92template <
class SymbolType >
97 cartesian_rec ( input,
ret, current, 0 );
107template <
class SymbolType >
108void GlushkovFollowNaive::preprocessSubMap (
const TAlphabet < SymbolType > & alphabetK, TSubstMap < SymbolType > & subMap ) {
109 for (
bool change =
true; change; change = false )
111 TAlphabet < SymbolType > & substSet = kv.second;
113 for (
auto eIter = substSet.begin ( ); eIter != substSet.end ( ); ) {
114 if ( alphabetK.count ( * eIter ) == 0 ) {
117 auto it = subMap.find ( * eIter );
118 size_t oldSize = substSet.size ( );
119 substSet.insert ( it->second.begin ( ), it->second.end ( ) );
120 change = ( oldSize != substSet.size ( ) );
121 eIter = substSet.erase ( eIter );
127template <
class SymbolType >
129 TSubstMap < SymbolType > subMap ( subMap2 );
130 preprocessSubMap ( alphabetK, subMap );
136 if ( alphabetK.count ( e ) > 0 )
150template <
class SymbolType >
164template <
class SymbolType >
168 auto itMap = subMap2.find (
node.getSubstitutionSymbol ( ).getSymbol ( ) );
170 itMap->second.clear ( );
173 itMap->second.
insert ( s );
187template <
class SymbolType >
192 auto itMap = subMap.find (
node.getSubstitutionSymbol ( ).getSymbol ( ) );
196 subMap[
node.getSubstitutionSymbol ( ).getSymbol ( )].insert ( s );
199 itMap->second = backup;
203template <
class SymbolType >
209 if ( symbolF ==
node.getSymbol ( ) ) {
215 return replaceConstants ( alphabetK, children, subMap );
218 for (
const auto & c :
node.getElements ( ) ) {
226template <
class SymbolType >
231template <
class SymbolType >
Definition: ranked_symbol.hpp:20
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
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
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: vector.hpp:125
auto end() &
Inherited behavior of end for non-const instance.
Definition: vector.hpp:155
Definition: GlushkovFollowNaive.h:21
static ext::set< ext::vector< common::ranked_symbol< SymbolType > > > follow(const rte::FormalRTE< SymbolType > &rte, const common::ranked_symbol< SymbolType > &symbol)
Definition: GlushkovFollowNaive.h:68
ext::set< ext::pair< StateType, StateType > > ret(const ext::set< ext::pair< StateType, StateType > > &S, const DeterministicPushdownStoreSymbolType &pdaSymbol, const InputSymbolType &input, const N &nondeterministic)
Definition: RHDPDACommon.h:57
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
Definition: ToFTAGlushkov.h:22