Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Full and linear tree index. The index serves as a adaptor of string index so that searching for tree patterns is possible. The representation of the index stores a string index and a subtree jump table. The implementation since parametrized with the string index represents a family of indexes. More...
#include <FullAndLinearIndex.h>
Public Member Functions | |
FullAndLinearIndex (StringIndex< common::ranked_symbol< SymbolType > > stringIndex, ext::vector< int > jumpTable) | |
const StringIndex< common::ranked_symbol< SymbolType > > & | getStringIndex () const & |
StringIndex< common::ranked_symbol< SymbolType > > && | getStringIndex () && |
const ext::vector< int > & | getJumps () const & |
ext::vector< int > && | getJumps () && |
const ext::set< common::ranked_symbol< SymbolType > > & | getAlphabet () const & |
ext::set< common::ranked_symbol< SymbolType > > && | getAlphabet () && |
void | setStringIndex (StringIndex< common::ranked_symbol< SymbolType > > stringIndex) |
bool | removeSymbolFromAlphabet (const common::ranked_symbol< SymbolType > &symbol) |
auto | operator<=> (const FullAndLinearIndex &other) const |
bool | operator== (const FullAndLinearIndex &other) const |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const FullAndLinearIndex &instance) |
Full and linear tree index. The index serves as a adaptor of string index so that searching for tree patterns is possible. The representation of the index stores a string index and a subtree jump table. The implementation since parametrized with the string index represents a family of indexes.
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 |
StringIndex | a template parameter representing a type of the string index |
|
explicit |
Creates a new instance of the index with concrete alphabet, bit vectors, and subtree jump table.
stringIndex | the concrete underlying string index. |
jumpTable | the subtree jump table |
|
inline |
Getter of the alphabet of the indexed tree.
|
inline |
Getter of the alphabet of the indexed tree.
ext::vector< int > && indexes::arbology::FullAndLinearIndex< SymbolType, StringIndex >::getJumps | ( | ) | && |
Getter of the subtree jump table
const ext::vector< int > & indexes::arbology::FullAndLinearIndex< SymbolType, StringIndex >::getJumps | ( | ) | const & |
Getter of the subtree jump table
StringIndex< common::ranked_symbol< SymbolType > > && indexes::arbology::FullAndLinearIndex< SymbolType, StringIndex >::getStringIndex | ( | ) | && |
Getter of the underlying string index.
const StringIndex< common::ranked_symbol< SymbolType > > & indexes::arbology::FullAndLinearIndex< SymbolType, StringIndex >::getStringIndex | ( | ) | const & |
Getter of the underlying string index.
|
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::FullAndLinearIndex< SymbolType, StringIndex >::setStringIndex | ( | StringIndex< common::ranked_symbol< SymbolType > > | stringIndex | ) |
Changes the underlying string index.
stringIndex | new string index |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |