Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Compressed bit parallel string 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. More...
#include <CompressedBitParallelIndex.h>
Public Member Functions | |
CompressedBitParallelIndex (ext::set< SymbolType > alphabet, ext::map< SymbolType, common::SparseBoolVector > vectors) | |
const ext::map< SymbolType, common::SparseBoolVector > & | getData () const & |
ext::map< SymbolType, common::SparseBoolVector > && | getData () && |
ext::vector< SymbolType > | getString () const |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
void | setCompressedBitVectorForSymbol (SymbolType symbol, common::SparseBoolVector data) |
bool | removeSymbolFromAlphabet (const SymbolType &symbol) |
auto | operator<=> (const CompressedBitParallelIndex &other) const |
auto | operator== (const CompressedBitParallelIndex &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const CompressedBitParallelIndex &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Compressed bit parallel string 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.
SymbolType | type of symbols of indexed string |
|
explicit |
Creates a new instance of the index with concrete alphabet and bit vectors.
alphabet | the alphabet of indexed string |
vectors | the compressed bit vectors |
|
inline |
Getter of the alphabet of the indexed string.
|
inline |
Getter of the alphabet of the indexed string.
ext::map< SymbolType, common::SparseBoolVector > && indexes::stringology::CompressedBitParallelIndex< SymbolType >::getData | ( | ) | && |
Getter of the compressed bit vectors.
const ext::map< SymbolType, common::SparseBoolVector > & indexes::stringology::CompressedBitParallelIndex< SymbolType >::getData | ( | ) | const & |
Getter of the compressed bit vectors.
ext::vector< SymbolType > indexes::stringology::CompressedBitParallelIndex< 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::stringology::CompressedBitParallelIndex< SymbolType >::setCompressedBitVectorForSymbol | ( | 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 |