Rudiments
|
Public Member Functions | |
avltreenode (valuetype value) | |
~avltreenode () | |
valuetype | getValue () const |
int32_t | compare (valuetype value) const |
int32_t | compare (avltreenode< valuetype > *peer) const |
avltreenode< valuetype > * | getParent () |
avltreenode< valuetype > * | getLeftChild () |
avltreenode< valuetype > * | getRightChild () |
uint8_t | getLeftHeight () |
uint8_t | getRightHeight () |
avltreenode< valuetype > * | getPrevious () |
avltreenode< valuetype > * | getNext () |
void | print () const |
The avltreenode class stores the values that compose a avltree.
avltreenode< valuetype >::avltreenode | ( | valuetype | value | ) |
Creates an instance of the avltreenode class that stores value "value".
avltreenode< valuetype >::~avltreenode | ( | ) |
Deletes this instance of the avltreenode class. Note however, that the value stored in the avltreenode is not deleted by this call.
int32_t avltreenode< valuetype >::compare | ( | valuetype | value | ) | const |
Returns a negative number, 0, or a positive number depending on whether the value stored in the node is respectively less than, equal to or greater than "value".
int32_t avltreenode< valuetype >::compare | ( | avltreenode< valuetype > * | peer | ) | const |
Returns a negative number, 0, or a positive number depending on whether the value stored in the node is respectively less than, equal to or greater than the value stored in "peer".
avltreenode<valuetype>* avltreenode< valuetype >::getLeftChild | ( | ) |
Returns the left child of this node in the avltree or NULL if this node has no left child.
uint8_t avltreenode< valuetype >::getLeftHeight | ( | ) |
Returns the left height of this node in the avltree.
avltreenode<valuetype>* avltreenode< valuetype >::getNext | ( | ) |
Returns the next node in the avltree (in an in-order, depth-first traversal) or NULL if this node is the last node in the tree.
avltreenode<valuetype>* avltreenode< valuetype >::getParent | ( | ) |
Returns the parent node in the avltree or NULL if this node is the top-most node in the tree.
avltreenode<valuetype>* avltreenode< valuetype >::getPrevious | ( | ) |
Returns the previous node in the avltree (in an in-order, depth-first traversal) or NULL if this node is the first node in the tree.
avltreenode<valuetype>* avltreenode< valuetype >::getRightChild | ( | ) |
Returns the right child of this node in the avltree or NULL if this node has no right child.
uint8_t avltreenode< valuetype >::getRightHeight | ( | ) |
Returns the right height of this node in the avltree.
valuetype avltreenode< valuetype >::getValue | ( | ) | const |
Return the value stored in the node.
void avltreenode< valuetype >::print | ( | ) | const |
Prints the value stored in the node.