|
datastructures 0.1.0
|
AVL Tree Node. More...
#include <_avl.hpp>
Public Attributes | |
| TItem | item |
| The key / key, value pair. | |
| avl_sign_type | sign = 0 |
| Determines whether the node is leaning to one side or balanced. | |
| avl_node_ptr< avl_node, TAlloc > | parent = nullptr |
| The parent node. | |
| avl_node_ptr< avl_node, TAlloc > | left = nullptr |
| The left sub-tree. | |
| avl_node_ptr< avl_node, TAlloc > | right = nullptr |
| The right sub-tree. | |
AVL Tree Node.
A tree node that stores an item of a given type, its parent and children and the sign.
| TItem | The item type, usually the const key_type or std::pair<const key_type, value_type>. |
| TAlloc | Allocator type to rebind the node allocator from, should be the item allocator. |
| TItem datastructures::detail::avl_node< TItem, TAlloc >::item |
The key / key, value pair.
| avl_node_ptr<avl_node, TAlloc> datastructures::detail::avl_node< TItem, TAlloc >::left = nullptr |
The left sub-tree.
| avl_node_ptr<avl_node, TAlloc> datastructures::detail::avl_node< TItem, TAlloc >::parent = nullptr |
The parent node.
It is always true that either parent->left = this or parent->right = this.
| avl_node_ptr<avl_node, TAlloc> datastructures::detail::avl_node< TItem, TAlloc >::right = nullptr |
The right sub-tree.
| avl_sign_type datastructures::detail::avl_node< TItem, TAlloc >::sign = 0 |
Determines whether the node is leaning to one side or balanced.
It is defined the following way: sign := height(right) - height(left).