Glossygloss
0.2
Glossygloss is set of classes to use several data structure as Tree or hash table.
|
Tree is a recursive structure using nodes. More...
#include <tree.hpp>
Public Member Functions | |
Tree () | |
Tree (const Tree< T > &other) | |
Tree (T element) | |
~Tree () | |
bool | contains (T element) |
int | height () |
void | put (T element) |
void | remove (T element) |
string | toString () |
Private Attributes | |
Node< T > | _root |
Tree is a recursive structure using nodes.
A root value and subtrees of children, represented as a set of linked nodes.
Common constructor, create an tree
[in] | element | Root of the tree |
bool Tree< T >::contains | ( | T | element | ) |
Is the element in the tree ?
[in] | element | Search the element in the Tree |
[out] | bool | True if element is here, else false. |
int Tree< T >::height | ( | ) |
The height of the tree
[out] | hgt | Height of the tree |
void Tree< T >::put | ( | T | element | ) |
Put an element in the tree
[in] | element | New element to put into the tree |
void Tree< T >::remove | ( | T | element | ) |
Remove an element from the tree
[in] | data | Element to remove |
string Tree< T >::toString | ( | ) |
Get a string representation of the Tree Each node tags is separated with a comma
[out] | desc | String representation of the tree |