Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Bit set string index. Stores a bit set for each symbol of the alphabet. The bit set 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 sets actually represent valid index. More...
#include <BitSetIndex.h>
Public Member Functions | |
BitSetIndex (ext::map< SymbolType, ext::bitset< BitmaskBitCount > > vectors, string::LinearString< SymbolType > string) | |
const ext::map< SymbolType, ext::bitset< BitmaskBitCount > > & | getData () const & |
ext::map< SymbolType, ext::bitset< BitmaskBitCount > > && | getData () && |
const string::LinearString< SymbolType > & | getString () const & |
string::LinearString< SymbolType > && | getString () && |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
void | setBitVectorForSymbol (SymbolType symbol, ext::bitset< BitmaskBitCount > data) |
bool | removeSymbolFromAlphabet (const SymbolType &symbol) |
auto | operator<=> (const BitSetIndex &other) const |
bool | operator== (const BitSetIndex &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const BitSetIndex &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Bit set string index. Stores a bit set for each symbol of the alphabet. The bit set 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 sets actually represent valid index.
SymbolType | type of symbols of indexed string |
|
explicit |
Creates a new instance of the index with concrete bit sets and original indexed string.
vectors | the bit sets |
string | the original indexed string |
|
inline |
Getter of the alphabet of the indexed string.
|
inline |
Getter of the alphabet of the indexed string.
ext::map< SymbolType, ext::bitset< BitmaskBitCount > > && indexes::stringology::BitSetIndex< SymbolType, BitmaskBitCount >::getData | ( | ) | && |
Getter of the bit sets.
const ext::map< SymbolType, ext::bitset< BitmaskBitCount > > & indexes::stringology::BitSetIndex< SymbolType, BitmaskBitCount >::getData | ( | ) | const & |
Getter of the bit sets.
string::LinearString< SymbolType > && indexes::stringology::BitSetIndex< SymbolType, BitmaskBitCount >::getString | ( | ) | && |
Getter of the original indexed string.
const string::LinearString< SymbolType > & indexes::stringology::BitSetIndex< SymbolType, BitmaskBitCount >::getString | ( | ) | const & |
Getter of the original indexed string.
|
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 of the indexed string. The symbol can be removed if it is not used in any of bit vector keys.
symbol | a symbol to remove. |
void indexes::stringology::BitSetIndex< SymbolType, BitmaskBitCount >::setBitVectorForSymbol | ( | SymbolType | symbol, |
ext::bitset< BitmaskBitCount > | 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 |