Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Tree structure represented in its natural representation. The representation is so called ranked, therefore it consists of ranked symbols. The rank of the ranked symbol needs to be compatible with unsigned integer. More...
#include <UnorderedRankedTree.h>
Public Member Functions | |
UnorderedRankedTree (ext::set< common::ranked_symbol< SymbolType > > alphabet, ext::tree< common::ranked_symbol< SymbolType > > tree) | |
Creates a new instance of the tree with concrete alphabet and content. More... | |
UnorderedRankedTree (ext::tree< common::ranked_symbol< SymbolType > > tree) | |
Creates a new instance of the tree based on the content, the alphabet is implicitly created from the content. More... | |
UnorderedRankedTree (const RankedTree< SymbolType > &tree) | |
Creates a new instance of the tree based on the Ranked Tree. More... | |
const ext::set< common::ranked_symbol< SymbolType > > & | getAlphabet () const & |
ext::set< common::ranked_symbol< SymbolType > > && | getAlphabet () && |
void | extendAlphabet (const ext::set< common::ranked_symbol< SymbolType > > &symbols) |
const ext::tree< common::ranked_symbol< SymbolType > > & | getContent () const & |
ext::tree< common::ranked_symbol< SymbolType > > && | getContent () && |
void | setTree (ext::tree< common::ranked_symbol< SymbolType > > tree) |
auto | operator<=> (const UnorderedRankedTree &other) const |
bool | operator== (const UnorderedRankedTree &other) const |
void | nicePrint (ext::ostream &os) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const UnorderedRankedTree &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Tree structure represented in its natural representation. The representation is so called ranked, therefore it consists of ranked symbols. The rank of the ranked symbol needs to be compatible with unsigned integer.
T = (A, C), A (Alphabet) = finite set of ranked symbols, C (Content) = tree in its natural representation
SymbolType | used for the symbol part of the ranked symbol |
|
explicit |
Creates a new instance of the tree with concrete alphabet and content.
alphabet | the initial alphabet of the tree |
tree | the initial tree in its natural representation |
|
explicit |
Creates a new instance of the tree based on the content, the alphabet is implicitly created from the content.
tree | the initial tree in its natural representation |
|
explicit |
Creates a new instance of the tree based on the Ranked Tree.
tree | the ranked tree to use. |
|
inline |
Adder of an alphabet symbols.
symbols | the new symbols to be added to the alphabet |
|
inline |
Getter of the alphabet.
|
inline |
Getter of the alphabet.
ext::tree< common::ranked_symbol< SymbolType > > && tree::UnorderedRankedTree< SymbolType >::getContent | ( | ) | && |
Getter of the tree representation.
const ext::tree< common::ranked_symbol< SymbolType > > & tree::UnorderedRankedTree< SymbolType >::getContent | ( | ) | const & |
Getter of the tree representation.
void tree::UnorderedRankedTree< SymbolType >::nicePrint | ( | ext::ostream & | os | ) | const |
Hierarchical printer of the tree.
os | the output stream destination of the print |
|
inline |
The three way comparison implementation
other | the other instance |
other
.
|
inline |
The equality comparison implementation.
other | the other object to compare with. |
void tree::UnorderedRankedTree< SymbolType >::setTree | ( | ext::tree< common::ranked_symbol< SymbolType > > | tree | ) |
Setter of the representation of the tree.
TreeException | in same situations as checkAlphabet and checkArities |
tree | new representation of the tree. |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |