31 template <
class SymbolType >
34 template <
class SymbolType >
38template <
class SymbolType >
40 auto symbolIter = pattern.
getContent ( ).begin ( );
45 for (
size_t i = 0;
i < compressedBitParallelIndex.
getJumps ( ).size ( ); ++
i )
53 if ( symbolVectorIter == compressedBitParallelIndex.
getData ( ).end ( ) )
58 for ( ++ symbolIter; symbolIter != pattern.
getContent ( ).
end ( ); ++ symbolIter ) {
63 for (
unsigned i : ( indexVector << 1 ) )
64 newVector [ compressedBitParallelIndex.
getJumps ( ) [
i ] - 1 ] =
true;
66 indexVector = newVector;
68 symbolVectorIter = compressedBitParallelIndex.
getData ( ).find ( * symbolIter );
70 if ( symbolVectorIter == compressedBitParallelIndex.
getData ( ).end ( ) )
73 indexVector = ( indexVector << 1 ) & symbolVectorIter->second;
79 for (
unsigned i : indexVector )
85template <
class SymbolType >
87 auto symbolIter = pattern.
getContent ( ).begin ( );
92 for (
size_t i = 0;
i < compressedBitParallelIndex.
getJumps ( ).size ( ) - 1; ++
i )
93 if (
static_cast < size_t > ( compressedBitParallelIndex.
getJumps ( ) [
i ] ) >
i )
101 if ( symbolVectorIter == compressedBitParallelIndex.
getData ( ).end ( ) )
106 for ( ++ symbolIter; symbolIter != pattern.
getContent ( ).
end ( ); ++ symbolIter ) {
111 for (
unsigned i : ( indexVector << 1 ) )
112 newVector [ compressedBitParallelIndex.
getJumps ( ) [
i ] - 1 ] =
true;
114 indexVector = newVector;
118 symbolVectorIter = compressedBitParallelIndex.
getData ( ).find ( * symbolIter );
120 if ( symbolVectorIter == compressedBitParallelIndex.
getData ( ).end ( ) )
123 indexVector = ( indexVector << 1 ) & symbolVectorIter->second;
129 for (
unsigned i : indexVector )
130 res.insert (
i + 1 );
Definition: CompressedBitParallelismPatterns.h:22
static ext::set< unsigned > query(const indexes::arbology::CompressedBitParallelTreeIndex< SymbolType > &compressedBitParallelIndex, const tree::PrefixRankedPattern< SymbolType > &pattern)
Definition: CompressedBitParallelismPatterns.h:39
Definition: SparseBoolVector.hpp:27
size_t size() const
Definition: SparseBoolVector.hpp:223
void resize(size_t newSize)
Definition: SparseBoolVector.hpp:212
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
Compressed bit parallel tree index. Stores a bit vector for each symbol of the alphabet....
Definition: CompressedBitParallelTreeIndex.h:55
const ext::map< common::ranked_symbol< SymbolType >, common::SparseBoolVector > & getData() const &
Definition: CompressedBitParallelTreeIndex.h:194
const ext::vector< int > & getJumps() const &
Definition: CompressedBitParallelTreeIndex.h:204
Tree pattern represented as linear sequece as result of preorder traversal with additional bar symbol...
Definition: PrefixRankedBarPattern.h:85
const common::ranked_symbol< SymbolType > & getSubtreeWildcard() const &
Definition: PrefixRankedBarPattern.h:202
const ext::vector< common::ranked_symbol< SymbolType > > & getContent() const &
Definition: PrefixRankedBarPattern.h:334
Tree pattern represented as linear sequece as result of preorder traversal. The representation is so ...
Definition: PrefixRankedPattern.h:77
const ext::vector< common::ranked_symbol< SymbolType > > & getContent() const &
Definition: PrefixRankedPattern.h:262
const common::ranked_symbol< SymbolType > & getSubtreeWildcard() const &
Definition: PrefixRankedPattern.h:154
Definition: BoyerMooreHorspool.h:22
int i
Definition: AllEpsilonClosure.h:118
return res
Definition: MinimizeByPartitioning.h:145
void end()
Definition: measurements.cpp:19