#include <Avl.hpp>
Inheritance diagram for Tree::AVL::Node< T, KeyType, DeleterT >:
Public Types | |
enum | { Left = 0, Right = 1 } |
enum | Balance { LeftTreeIsHeavier = -1, Balanced = 0, RightTreeIsHeavier = 1 } |
The balanced factor. More... | |
Public Member Functions | |
Node *& | fromCompare (const Comparator::CompareType comp) |
Get the node from the given compare result. | |
Node *& | fromInverseCompare (const Comparator::CompareType comp) |
Get the opposite node from the given compare result. | |
void | left (Node *left) |
Set the left node. | |
const Node *& | left () const |
Get the left node. | |
Node *& | left () |
Get the left node. | |
Node (Node *_root, const T &_data, KeyType _key) | |
void | right (Node *right) |
Set the right node. | |
const Node *& | right () const |
Get the right node. | |
Node *& | right () |
Get the right node. | |
~Node () | |
Static Public Member Functions | |
static const Balance | balanceFromCompare (const Comparator::CompareType comp) |
Get the (un)balanced factor from the given compare result. | |
static const Balance | balanceFromInverseCompare (const Comparator::CompareType comp) |
Get the opposite (un)balanced factor from the given compare result. | |
static const Balance | strictBalanceFromCompare (const Comparator::CompareType comp) |
Get the balanced factor from the given compare result, by respecting all the case. | |
Public Attributes | |
Balance | balance |
The current node balance factor. | |
Node * | child [2] |
The left subtree. | |
T | data |
The data. | |
KeyType | key |
The key. | |
Node * | rootNode |
The root node. |
anonymous enum |
enum Tree::AVL::AllNodes::Balance [inherited] |
Tree::AVL::Node< T, KeyType, DeleterT >::Node | ( | Node< T, KeyType, DeleterT > * | _root, | |
const T & | _data, | |||
KeyType | _key | |||
) | [inline] |
Tree::AVL::Node< T, KeyType, DeleterT >::~Node | ( | ) | [inline] |
static const Balance Tree::AVL::Node< T, KeyType, DeleterT >::balanceFromCompare | ( | const Comparator::CompareType | comp | ) | [inline, static] |
Get the (un)balanced factor from the given compare result.
static const Balance Tree::AVL::Node< T, KeyType, DeleterT >::balanceFromInverseCompare | ( | const Comparator::CompareType | comp | ) | [inline, static] |
Get the opposite (un)balanced factor from the given compare result.
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::fromCompare | ( | const Comparator::CompareType | comp | ) | [inline] |
Get the node from the given compare result.
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::fromInverseCompare | ( | const Comparator::CompareType | comp | ) | [inline] |
Get the opposite node from the given compare result.
void Tree::AVL::Node< T, KeyType, DeleterT >::left | ( | Node< T, KeyType, DeleterT > * | left | ) | [inline] |
Set the left node.
const Node*& Tree::AVL::Node< T, KeyType, DeleterT >::left | ( | ) | const [inline] |
Get the left node.
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::left | ( | ) | [inline] |
Get the left node.
void Tree::AVL::Node< T, KeyType, DeleterT >::right | ( | Node< T, KeyType, DeleterT > * | right | ) | [inline] |
Set the right node.
const Node*& Tree::AVL::Node< T, KeyType, DeleterT >::right | ( | ) | const [inline] |
Get the right node.
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::right | ( | ) | [inline] |
Get the right node.
static const Balance Tree::AVL::Node< T, KeyType, DeleterT >::strictBalanceFromCompare | ( | const Comparator::CompareType | comp | ) | [inline, static] |
Get the balanced factor from the given compare result, by respecting all the case.
Balance Tree::AVL::Node< T, KeyType, DeleterT >::balance |
The current node balance factor.
Node* Tree::AVL::Node< T, KeyType, DeleterT >::child[2] |
The left subtree.
T Tree::AVL::Node< T, KeyType, DeleterT >::data |
The data.
KeyType Tree::AVL::Node< T, KeyType, DeleterT >::key |
The key.
Node* Tree::AVL::Node< T, KeyType, DeleterT >::rootNode |
The root node.