Tree::AVL::Node< T, KeyType, DeleterT > Struct Template Reference

#include <Avl.hpp>

Inheritance diagram for Tree::AVL::Node< T, KeyType, DeleterT >:

Tree::AVL::AllNodes List of all members.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
struct 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.
Nodechild [2]
 The left subtree.
data
 The data.
KeyType key
 The key.
NoderootNode
 The root node.

Member Enumeration Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
anonymous enum

Enumerator:
Left 
Right 

enum Tree::AVL::AllNodes::Balance [inherited]

The balanced factor.

Enumerator:
LeftTreeIsHeavier 
Balanced 
RightTreeIsHeavier 


Constructor & Destructor Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Tree::AVL::Node< T, KeyType, DeleterT >::Node ( Node< T, KeyType, DeleterT > *  _root,
const T &  _data,
KeyType  _key 
) [inline]

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Tree::AVL::Node< T, KeyType, DeleterT >::~Node (  )  [inline]


Member Function Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
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.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
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.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::fromCompare ( const Comparator::CompareType  comp  )  [inline]

Get the node from the given compare result.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::fromInverseCompare ( const Comparator::CompareType  comp  )  [inline]

Get the opposite node from the given compare result.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
void Tree::AVL::Node< T, KeyType, DeleterT >::left ( Node< T, KeyType, DeleterT > *  left  )  [inline]

Set the left node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
const Node*& Tree::AVL::Node< T, KeyType, DeleterT >::left (  )  const [inline]

Get the left node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::left (  )  [inline]

Get the left node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
void Tree::AVL::Node< T, KeyType, DeleterT >::right ( Node< T, KeyType, DeleterT > *  right  )  [inline]

Set the right node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
const Node*& Tree::AVL::Node< T, KeyType, DeleterT >::right (  )  const [inline]

Get the right node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node*& Tree::AVL::Node< T, KeyType, DeleterT >::right (  )  [inline]

Get the right node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
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.


Member Data Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Balance Tree::AVL::Node< T, KeyType, DeleterT >::balance

The current node balance factor.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node* Tree::AVL::Node< T, KeyType, DeleterT >::child[2]

The left subtree.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
T Tree::AVL::Node< T, KeyType, DeleterT >::data

The data.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
KeyType Tree::AVL::Node< T, KeyType, DeleterT >::key

The key.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Node* Tree::AVL::Node< T, KeyType, DeleterT >::rootNode

The root node.


The documentation for this struct was generated from the following file:

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is