GClasses
GClasses::GTreeNode< T > Class Template Reference

Detailed Description

template<typename T>
class GClasses::GTreeNode< T >

This is a helper class used by GIndexedMultiSet.

#include <GTree.h>

Public Member Functions

 GTreeNode (const T &k)
 
 ~GTreeNode ()
 
GTreeNode< T > * balance ()
 
GTreeNode< T > * find (const T &k, size_t start, size_t *outIndex)
 
GTreeNode< T > * get (size_t index)
 
GTreeNode< T > * insert (GTreeNode< T > *newNode)
 
void isolate ()
 
void print (size_t depth)
 
void recount ()
 
GTreeNode< T > * remove_by_index (size_t index, GTreeNode< T > **outNode)
 
GTreeNode< T > * remove_by_value (const T &k, GTreeNode< T > **outNode)
 
GTreeNode< T > * rotateLeft ()
 
GTreeNode< T > * rotateRight ()
 

Public Attributes

key
 
GTreeNodeleft
 
GTreeNoderight
 
size_t size
 

Constructor & Destructor Documentation

template<typename T>
GClasses::GTreeNode< T >::GTreeNode ( const T &  k)
inline
template<typename T>
GClasses::GTreeNode< T >::~GTreeNode ( )
inline

Member Function Documentation

template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::balance ( )
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::find ( const T &  k,
size_t  start,
size_t *  outIndex 
)
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::get ( size_t  index)
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::insert ( GTreeNode< T > *  newNode)
inline
template<typename T>
void GClasses::GTreeNode< T >::isolate ( )
inline
template<typename T>
void GClasses::GTreeNode< T >::print ( size_t  depth)
inline
template<typename T>
void GClasses::GTreeNode< T >::recount ( )
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::remove_by_index ( size_t  index,
GTreeNode< T > **  outNode 
)
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::remove_by_value ( const T &  k,
GTreeNode< T > **  outNode 
)
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::rotateLeft ( )
inline
template<typename T>
GTreeNode<T>* GClasses::GTreeNode< T >::rotateRight ( )
inline

Member Data Documentation

template<typename T>
T GClasses::GTreeNode< T >::key
template<typename T>
GTreeNode* GClasses::GTreeNode< T >::left
template<typename T>
GTreeNode* GClasses::GTreeNode< T >::right
template<typename T>
size_t GClasses::GTreeNode< T >::size