|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Suffix trie string index. Tree like representation of all suffixes. Nodes of the trie are optionally containing index of the suffix. The parent child relationship of nodes is represented by single symbol. The class does not checks whether the trie actually is suffix trie. More...
#include <SuffixTrie.h>
Public Member Functions | |
| SuffixTrie (ext::set< SymbolType > edgeAlphabet) | |
| SuffixTrie (ext::set< SymbolType > edgeAlphabet, ext::trie< SymbolType, std::optional< unsigned > > trie) | |
| SuffixTrie (ext::trie< SymbolType, std::optional< unsigned > > trie) | |
| const ext::trie< SymbolType, std::optional< unsigned > > & | getRoot () const & |
| ext::trie< SymbolType, std::optional< unsigned > > && | getRoot () && |
| const ext::set< SymbolType > & | getAlphabet () const & |
| ext::set< SymbolType > && | getAlphabet () && |
| void | setTree (ext::trie< SymbolType, std::optional< unsigned > > trie) |
| bool | removeSymbolFromEdgeAlphabet (const SymbolType &symbol) |
| auto | operator<=> (const SuffixTrie &other) const |
| bool | operator== (const SuffixTrie &other) const |
Public Member Functions inherited from core::Components< SuffixTrie< DefaultSymbolType >, ext::set< DefaultSymbolType >, component::Set, GeneralAlphabet > | |
| void | accessComponent () |
Friends | |
| ext::ostream & | operator<< (ext::ostream &out, const SuffixTrie &instance) |
Additional Inherited Members | |
Static Public Member Functions inherited from core::Components< SuffixTrie< DefaultSymbolType >, ext::set< DefaultSymbolType >, component::Set, GeneralAlphabet > | |
| static void | registerComponent () |
| static void | unregisterComponent () |
Suffix trie string index. Tree like representation of all suffixes. Nodes of the trie are optionally containing index of the suffix. The parent child relationship of nodes is represented by single symbol. The class does not checks whether the trie actually is suffix trie.
| SymbolType | type of symbols of indexed string |
|
explicit |
Creates a new instance of the index over concrete alphabet and content initialized to empty root.
| edgeAlphabet | the alphabet of symbols on node to node edges. |
|
explicit |
Creates a new instance of the index over concrete alphabet and raw suffix trie.
| edgeAlphabet | the alphabet of symbols on node to node edges. |
| trie | the representation of suffix trie. |
|
explicit |
Creates a new instance of the index based on raw suffix trie.
| trie | the representation of suffix trie. |
|
inline |
Getter of the alphabet of the indexed string.
|
inline |
Getter of the alphabet of the indexed string.
| ext::trie< SymbolType, std::optional< unsigned > > && indexes::stringology::SuffixTrie< SymbolType >::getRoot | ( | ) | && |
Getter of the raw suffix trie.
| const ext::trie< SymbolType, std::optional< unsigned > > & indexes::stringology::SuffixTrie< SymbolType >::getRoot | ( | ) | const & |
Getter of the raw suffix trie.
|
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.
| symbol | a symbol to remove. |
| void indexes::stringology::SuffixTrie< SymbolType >::setTree | ( | ext::trie< SymbolType, std::optional< unsigned > > | trie | ) |
Sets the root node of the suffix trie
| tree | root node to set |
|
friend |
Print this object as raw representation to ostream.
| out | ostream where to print |
| instance | object to print |