10#include <ext/algorithm>
23 template <
class SymbolType >
26 template <
class SymbolType >
29 template <
class SymbolType >
32 template <
class SymbolType >
34 template <
class SymbolType >
36 template <
class SymbolType >
39 template <
class SymbolType >
41 template <
class SymbolType >
44 template <
class SymbolType >
46 template <
class SymbolType >
49 template <
class SymbolType >
52 template <
class SymbolType >
54 template <
class SymbolType >
56 template <
class SymbolType >
58 template <
class SymbolType >
60 template <
class SymbolType >
63 template <
class SymbolType >
67template <
class SymbolType >
72 std::sort (
tree.getChildren ( ).begin ( ),
tree.getChildren ( ).end ( ) );
75template <
class SymbolType >
81template <
class SymbolType >
88template <
class SymbolType >
95template <
class SymbolType >
100 children.push_back ( unrankedToRanked < SymbolType > ( child ) );
103 unsigned size = children.size ( );
107template <
class SymbolType >
109 std::stack < ext::tree < common::ranked_symbol < SymbolType > > > tree_stack;
112 if ( x.getRank ( ) == 0 ) {
117 for (
unsigned i = 0;
i < x.getRank ( ); ++
i ) {
118 children.push_back ( tree_stack.top ( ) );
122 std::reverse ( children.
begin ( ), children.
end ( ) );
128 return tree_stack.top ( );
131template <
class SymbolType >
137 for (
unsigned i = 0;
i < x.
getRank ( ); ++
i ) {
138 children.push_back ( prefixToTreeInt ( from, index ) );
144template <
class SymbolType >
147 return prefixToTreeInt ( from, index );
150template <
class SymbolType >
155 children.push_back ( rankedToUnranked < SymbolType > ( child ) );
161template <
class SymbolType >
163 unsigned readIndex = src.size ( ) - 1;
166 postfixToPrefixInt ( src, dest, readIndex );
168 std::reverse ( dest.
begin ( ), dest.
end ( ) );
173template <
class SymbolType >
175 unsigned root = readIndex --;
176 unsigned rank = src [ root ].getRank ( );
178 for (
unsigned i = 0;
i < rank; ++
i )
179 postfixToPrefixInt ( src, dest, readIndex );
181 dest.push_back ( src [ root ] );
184template <
class SymbolType >
189 res.push_back ( * iter );
194template <
class SymbolType >
199 if ( iter.getVirtual ( ) )
200 res.push_back ( bar );
202 res.push_back ( * iter );
207template <
class SymbolType >
212 if ( iter.getVirtual ( ) )
215 res.push_back ( * iter );
220template <
class SymbolType >
225 if ( iter.getVirtual ( ) )
226 if ( ( * iter == subtreeWildcard ) )
227 res.push_back ( variablesBar );
231 res.push_back ( * iter );
236template <
class SymbolType >
241 if ( iter.getVirtual ( ) )
242 if ( ( * iter == subtreeWildcard ) || nonlinearVariables.count ( * iter ) )
243 res.push_back ( variablesBar );
247 res.push_back ( * iter );
252template <
class SymbolType >
257 res.push_back ( * iter );
Definition: ranked_symbol.hpp:20
const SymbolType & getSymbol() const &
Definition: ranked_symbol.hpp:73
const size_t & getRank() const &
Definition: ranked_symbol.hpp:83
The iterator type over structure of the tree representing nodes and node_ends.
Definition: tree.hpp:152
Class introducing a tree with interface trying to be close to the interface of standard library conta...
Definition: tree.hpp:52
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: TreeAuxiliary.h:22
static ext::set< common::ranked_symbol< SymbolType > > computeBars(const ext::set< common::ranked_symbol< SymbolType > > &alphabet, const SymbolType &barBase)
Definition: TreeAuxiliary.h:89
static ext::tree< common::ranked_symbol< SymbolType > > unrankedToRanked(const ext::tree< SymbolType > &tree)
Definition: TreeAuxiliary.h:96
static ext::vector< common::ranked_symbol< SymbolType > > postfixToPrefix(const ext::vector< common::ranked_symbol< SymbolType > > &src)
Definition: TreeAuxiliary.h:162
static ext::tree< common::ranked_symbol< SymbolType > > prefixToTree(const ext::vector< common::ranked_symbol< SymbolType > > &from)
Definition: TreeAuxiliary.h:145
static ext::vector< common::ranked_symbol< SymbolType > > treeToPrefix(const ext::tree< common::ranked_symbol< SymbolType > > &tree)
Definition: TreeAuxiliary.h:185
static ext::vector< common::ranked_symbol< SymbolType > > treeToPostfix(const ext::tree< common::ranked_symbol< SymbolType > > &tree)
Definition: TreeAuxiliary.h:253
static ext::tree< SymbolType > sort(ext::tree< SymbolType > tree)
Definition: TreeAuxiliary.h:76
static ext::tree< common::ranked_symbol< SymbolType > > postfixToTree(const ext::vector< common::ranked_symbol< SymbolType > > &from)
Definition: TreeAuxiliary.h:108
static ext::set< SymbolType > unrankSymbols(const ext::set< common::ranked_symbol< SymbolType > > &alphabet)
Definition: TreeAuxiliary.h:82
static ext::tree< SymbolType > rankedToUnranked(const ext::tree< common::ranked_symbol< SymbolType > > &tree)
Definition: TreeAuxiliary.h:151
Definition: BarSymbol.cpp:12
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
Definition: BackwardOccurrenceTest.h:17