29 template <
class SymbolType >
31 template <
class SymbolType >
33 template <
class SymbolType >
35 template <
class SymbolType >
43 template <
class SymbolType >
45 template <
class SymbolType >
47 template <
class SymbolType >
49 template <
class SymbolType >
54template <
class SymbolType >
60 children.push_back ( repeats ( child, data, minId ) );
61 childRepeatsKey.second.push_back ( children.back ( ).getData ( ) );
64 unsigned & uniqueRepeatId = data[childRepeatsKey];
66 if ( uniqueRepeatId == 0 ) uniqueRepeatId = minId++;
71template <
class SymbolType >
79template <
class SymbolType >
88 for (
unsigned i = 0;
i < symbols[
begin].getRank ( ); ++
i )
89 childRepeatsKey.second.push_back ( repeatsPrefixRanked ( symbols,
res, data, minId, index ) );
91 unsigned & uniqueRepeatId = data[childRepeatsKey];
93 if ( uniqueRepeatId == 0 ) uniqueRepeatId = minId++;
99template <
class SymbolType >
106 repeatsPrefixRanked (
tree.getContent ( ),
res, data, minId, index );
110template <
class SymbolType >
119 for (
unsigned i = symbols.size ( ) - 1;
i > symbols.size ( ) - 1 - symbols[
begin].getRank ( ); --
i )
120 childRepeatsKey.second.push_back ( repeatsPostfixRanked ( symbols,
res, data, minId, index ) );
122 unsigned & uniqueRepeatId = data[childRepeatsKey];
124 if ( uniqueRepeatId == 0 ) uniqueRepeatId = minId++;
126 unsigned pos_in_res =
begin - symbols.size ( ) +
res.size ( );
128 return res[pos_in_res];
131template <
class SymbolType >
134 int index =
tree.getContent ( ).size ( ) - 1;
139 repeatsPostfixRanked (
tree.getContent ( ),
res, data, minId, index );
144template <
class SymbolType >
153 for (
unsigned i = 0;
i < symbols[
begin].getRank ( ); ++
i )
154 childRepeatsKey.second.push_back ( repeatsPrefixRankedBar ( symbols,
res, data, minId, barId, index ) );
156 unsigned & uniqueRepeatId = data[childRepeatsKey];
158 if ( uniqueRepeatId == 0 ) uniqueRepeatId = minId++;
167template <
class SymbolType >
170 unsigned minId = barId + 1;
175 repeatsPrefixRankedBar (
tree.getContent ( ),
res, data, minId, barId, index );
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
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
Tree structure represented as linear sequece as result of postorder traversal. The representation is ...
Definition: PostfixRankedTree.h:73
Tree structure represented as linear sequece as result of preorder traversal with additional bar symb...
Definition: PrefixRankedBarTree.h:78
Tree structure represented as linear sequece as result of preorder traversal. The representation is s...
Definition: PrefixRankedTree.h:71
Tree structure represented in its natural representation. The representation is so called ranked,...
Definition: RankedTree.h:72
Definition: ExactSubtreeRepeatsNaive.h:28
int i
Definition: AllEpsilonClosure.h:118
return res
Definition: MinimizeByPartitioning.h:145
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
Definition: BackwardOccurrenceTest.h:17