Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Compressed bit parallel nonlinear tree index. Stores a bit vector for each symbol of the alphabet. The bit vector of symbol a contains true on index i if symbol a is on i-th position in the indexed string. The class does not check whether the bit vectors actually represent valid index. The bit vectors are compressed with run length encoding packing runs of false values. Additionally the index contains a subtree jump table representing positions after a jump over a subtree. The index is supposed to be able to provide data to search for nonlinear tree patterns. Therefore it also contains representation of subtree repeats. More...
#include <NonlinearCompressedBitParallelTreeIndex.h>
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const NonlinearCompressedBitParallelTreeIndex &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Compressed bit parallel nonlinear tree index. Stores a bit vector for each symbol of the alphabet. The bit vector of symbol a contains true on index i if symbol a is on i-th position in the indexed string. The class does not check whether the bit vectors actually represent valid index. The bit vectors are compressed with run length encoding packing runs of false values. Additionally the index contains a subtree jump table representing positions after a jump over a subtree. The index is supposed to be able to provide data to search for nonlinear tree patterns. Therefore it also contains representation of subtree repeats.
The actual notation of used tree is irelevant. The index, as fas as the data structure is concerned, is not different. Of course tree in postfix notation must be queried with patterns in postfix notation, etc.
SymbolType | used for the symbol part of the ranked symbol |
|
explicit |
Creates a new instance of the index with concrete alphabet, bit vectors, subtree jump table, and subtree repeats.
alphabet | the alphabet of indexed string |
vectors | the compressed bit vectors |
jumpTable | the subtree jump table |
repeats | the subtree repeats table |
|
inline |
Getter of the alphabet of the indexed tree.
|
inline |
Getter of the alphabet of the indexed tree.
ext::map< common::ranked_symbol< SymbolType >, common::SparseBoolVector > && indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getData | ( | ) | && |
Getter of the compressed bit vectors.
const ext::map< common::ranked_symbol< SymbolType >, common::SparseBoolVector > & indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getData | ( | ) | const & |
Getter of the compressed bit vectors.
ext::vector< int > && indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getJumps | ( | ) | && |
Getter of the subtree jump table
const ext::vector< int > & indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getJumps | ( | ) | const & |
Getter of the subtree jump table
ext::vector< unsigned > && indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getRepeats | ( | ) | && |
Getter of the subtree repeats table
const ext::vector< unsigned > & indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getRepeats | ( | ) | const & |
Getter of the subtree repeats table
ext::vector< common::ranked_symbol< SymbolType > > indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::getString |
Reconstructs the indexed string from bit vectors.
|
inline |
The three way comparison implementation
other | the other instance |
other
.
|
inline |
The equality comparison implementation.
other | the other object to compare with. |
|
inline |
Remover of a symbol from the alphabet. The symbol can be removed if it is not used in any of bit vector keys.
symbol | a symbol to remove. |
void indexes::arbology::NonlinearCompressedBitParallelTreeIndex< SymbolType >::setNonlinearCompressedBitVectorForSymbol | ( | common::ranked_symbol< SymbolType > | symbol, |
common::SparseBoolVector | data | ||
) |
Changes the bit vector for concrete symbol.
symbol | the changed symbol |
data | the new bit vector |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |