#include <AVLTree.h>
Public Member Functions | |
| AVLTreeNode (key_type key, item_type item, AVLTreeNode< key_type, item_type > *parent=NULL) | |
| Constructor. | |
| ~AVLTreeNode () | |
| Destructor. | |
| void | calculate_depth () |
| Called when the node is on the path to a newly inserted or removed node. | |
| uint | depth () |
| Returns the depth of the subtree from the given point. | |
| AVLTreeNode< key_type, item_type > * | left () |
| Return the left child of the node. | |
| const AVLTreeNode< key_type, item_type > * | left () const |
| Return the left child of the node. | |
| void | left (AVLTreeNode< key_type, item_type > *node_ptr) |
| Sets the left child of the node. | |
| AVLTreeNode< key_type, item_type > * | right () |
| Return the right child of the node. | |
| const AVLTreeNode< key_type, item_type > * | right () const |
| Return the right child of the node. | |
| void | right (AVLTreeNode< key_type, item_type > *node_ptr) |
| Sets the right child of the node. | |
| AVLTreeNode< key_type, item_type > * | parent () |
| Returns the parent of the node. | |
| const AVLTreeNode< key_type, item_type > * | parent () const |
| Returns the parent of the node. | |
| void | parent (AVLTreeNode< key_type, item_type > *node_ptr) |
| Sets the parent of the node. | |
| AVLTreeNode< key_type, item_type > & | operator= (AVLTreeNode< key_type, item_type > &node) |
| Assignment operator. | |
Public Attributes | |
| key_type | first |
| The key of the node. | |
| item_type | second |
| The item of the node. | |
Protected Member Functions | |
| AVLTreeNode< key_type, item_type > * | iter_next () |
| ++ operator. | |
| AVLTreeNode< key_type, item_type > * | iter_previous () |
| -- operator. | |
| const AVLTreeNode< key_type, item_type > * | iter_next () const |
| ++ operator. | |
| const AVLTreeNode< key_type, item_type > * | iter_previous () const |
| -- operator. | |
Protected Attributes | |
| AVLTreeNode< key_type, item_type > * | left_ |
| The left child of the node. | |
| AVLTreeNode< key_type, item_type > * | right_ |
| The right child of the node. | |
| AVLTreeNode< key_type, item_type > * | parent_ |
| The parent of the node. | |
| uint | depth_ |
| Stores the depth of the node's subtree. | |
| uint | depth_count_ |
| Stores the number of nodes with the given depth. | |
Friends | |
| class | Iterator< AVLTreeNode< key_type, item_type > > |
| Allow iterators to manipulate protected members. | |
| class | Const_Iterator< AVLTreeNode< key_type, item_type > > |
| Allow iterators to manipulate protected members. | |
| class | AVLTree< key_type, item_type > |
| Allow AVLTree to manipulate protected members. | |
Definition at line 74 of file AVLTree.h.
| DREAM::AVLTreeNode< key_type, item_type >::AVLTreeNode | ( | key_type | key, | |
| item_type | item, | |||
| AVLTreeNode< key_type, item_type > * | parent = NULL | |||
| ) |
| DREAM::AVLTreeNode< key_type, item_type >::~AVLTreeNode | ( | ) |
| AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::iter_next | ( | ) | [protected] |
++ operator.
This operator does not actually change the node's value and should only be used from within Iterators.
Definition at line 122 of file AVLTree.cpp.
References DREAM::AVLTreeNode< key_type, item_type >::left_.
| AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::iter_previous | ( | ) | [protected] |
-- operator.
This operator does not actually change the node's value and should only be used from within Iterators.
Definition at line 152 of file AVLTree.cpp.
References DREAM::AVLTreeNode< key_type, item_type >::right_.
| const AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::iter_next | ( | ) | const [protected] |
++ operator.
This operator does not actually change the node's value and should only be used from within Iterators.
Definition at line 182 of file AVLTree.cpp.
References DREAM::AVLTreeNode< key_type, item_type >::left_.
| const AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::iter_previous | ( | ) | const [protected] |
-- operator.
This operator does not actually change the node's value and should only be used from within Iterators.
Definition at line 212 of file AVLTree.cpp.
References DREAM::AVLTreeNode< key_type, item_type >::right_.
| void DREAM::AVLTreeNode< key_type, item_type >::calculate_depth | ( | ) |
Called when the node is on the path to a newly inserted or removed node.
It manages the depth_ and depth_count_ variables...
Definition at line 81 of file AVLTree.cpp.
Referenced by DREAM::AVLTree< key_type, item_type >::erase().
| uint DREAM::AVLTreeNode< key_type, item_type >::depth | ( | ) | [inline] |
| AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::left | ( | ) | [inline] |
| const AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::left | ( | ) | const [inline] |
| void DREAM::AVLTreeNode< key_type, item_type >::left | ( | AVLTreeNode< key_type, item_type > * | node_ptr | ) | [inline] |
| AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::right | ( | ) | [inline] |
| const AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::right | ( | ) | const [inline] |
| void DREAM::AVLTreeNode< key_type, item_type >::right | ( | AVLTreeNode< key_type, item_type > * | node_ptr | ) | [inline] |
| AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::parent | ( | ) | [inline] |
| const AVLTreeNode< key_type, item_type > * DREAM::AVLTreeNode< key_type, item_type >::parent | ( | ) | const [inline] |
| void DREAM::AVLTreeNode< key_type, item_type >::parent | ( | AVLTreeNode< key_type, item_type > * | node_ptr | ) | [inline] |
| AVLTreeNode< key_type, item_type > & DREAM::AVLTreeNode< key_type, item_type >::operator= | ( | AVLTreeNode< key_type, item_type > & | node | ) |
friend class Iterator< AVLTreeNode< key_type, item_type > > [friend] |
friend class Const_Iterator< AVLTreeNode< key_type, item_type > > [friend] |
friend class AVLTree< key_type, item_type > [friend] |
AVLTreeNode<key_type, item_type>* DREAM::AVLTreeNode< key_type, item_type >::left_ [protected] |
The left child of the node.
Definition at line 99 of file AVLTree.h.
Referenced by DREAM::AVLTree< key_type, item_type >::balance_right(), DREAM::AVLTree< key_type, item_type >::begin(), DREAM::AVLTree< key_type, item_type >::find(), DREAM::AVLTree< key_type, item_type >::get_smaller_node(), DREAM::AVLTree< key_type, item_type >::insert(), and DREAM::AVLTreeNode< key_type, item_type >::iter_next().
AVLTreeNode<key_type, item_type>* DREAM::AVLTreeNode< key_type, item_type >::right_ [protected] |
The right child of the node.
Definition at line 102 of file AVLTree.h.
Referenced by DREAM::AVLTree< key_type, item_type >::balance_right(), DREAM::AVLTree< key_type, item_type >::find(), DREAM::AVLTree< key_type, item_type >::get_larger_node(), DREAM::AVLTree< key_type, item_type >::insert(), and DREAM::AVLTreeNode< key_type, item_type >::iter_previous().
AVLTreeNode<key_type, item_type>* DREAM::AVLTreeNode< key_type, item_type >::parent_ [protected] |
The parent of the node.
Definition at line 105 of file AVLTree.h.
Referenced by DREAM::AVLTree< key_type, item_type >::balance_right(), DREAM::AVLTree< key_type, item_type >::erase(), DREAM::AVLTree< key_type, item_type >::get_larger_node(), and DREAM::AVLTree< key_type, item_type >::get_smaller_node().
uint DREAM::AVLTreeNode< key_type, item_type >::depth_ [protected] |
uint DREAM::AVLTreeNode< key_type, item_type >::depth_count_ [protected] |
| key_type DREAM::AVLTreeNode< key_type, item_type >::first |
The key of the node.
Definition at line 161 of file AVLTree.h.
Referenced by DREAM::AVLTree< key_type, item_type >::find(), and DREAM::AVLTree< key_type, item_type >::insert().
| item_type DREAM::AVLTreeNode< key_type, item_type >::second |
The item of the node.
Definition at line 164 of file AVLTree.h.
Referenced by DREAM::AVLTree< key_type, item_type >::insert().
1.5.1