Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
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. More...
#include <BitParallelIndex.h>
Public Member Functions | |
BitParallelIndex (ext::set< SymbolType > alphabet, ext::map< SymbolType, ext::vector< bool > > vectors) | |
const ext::map< SymbolType, ext::vector< bool > > & | getData () const & |
ext::map< SymbolType, ext::vector< bool > > && | getData () && |
ext::vector< SymbolType > | getString () const |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
void | setBitVectorForSymbol (SymbolType symbol, ext::vector< bool > data) |
bool | removeSymbolFromAlphabet (const SymbolType &symbol) |
auto | operator<=> (const BitParallelIndex &other) const |
bool | operator== (const BitParallelIndex &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const BitParallelIndex &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
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.
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 bit vectors |
|
inline |
Getter of the alphabet of the indexed string.
|
inline |
Getter of the alphabet of the indexed string.
ext::map< SymbolType, ext::vector< bool > > && indexes::stringology::BitParallelIndex< SymbolType >::getData | ( | ) | && |
Getter of the bit vectors.
const ext::map< SymbolType, ext::vector< bool > > & indexes::stringology::BitParallelIndex< SymbolType >::getData | ( | ) | const & |
Getter of the bit vectors.
ext::vector< SymbolType > indexes::stringology::BitParallelIndex< 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::BitParallelIndex< SymbolType >::setBitVectorForSymbol | ( | SymbolType | symbol, |
ext::vector< bool > | 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 |