Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Trees - BinaryTreeNodeC<class KeyT,class DataT>
 

  PUBLIC
BinaryTreeNodeC::BinaryTreeNodeC(void)
BinaryTreeNodeC::BinaryTreeNodeC(const KeyT &,const DataT &,int,bool)
BinaryTreeNodeC::~BinaryTreeNodeC(void)
BinaryTreeNodeC::Copy(void) const
BinaryTreeNodeC::Child0(void)
BinaryTreeNodeC::Child1(void)
BinaryTreeNodeC::Key(void) const
BinaryTreeNodeC::Data(void)
BinaryTreeNodeC::Data(void) const
BinaryTreeNodeC::IsDeleted(void) const
BinaryTreeNodeC::SetDeleted(bool)
BinaryTreeNodeC::Balance(void)
BinaryTreeNodeC::ChildBalance0(void) const
BinaryTreeNodeC::ChildBalance1(void) const
BinaryTreeNodeC::Dump(ostream &,int)

   BinaryTreeNodeC<class KeyT,class DataT>   
 
Node in binary tree.
 
include "Ravl/BinaryTree.hh"
Source file:Ravl/Core/Container/Trees/BinaryTree.hh
User Level:Develop
Library:RavlCore
Example:exBinaryTree.cc
In Scope:RavlN

Variables:
KeyT key;

DataT data;

bool deleted;

BinaryTreeNodeC * child[];
0=Lower, 1= higher values FIXME:- Balance is currently only used in AVLTrees, it could be moved to a derived class used by them.

IntT balance;

Methods:
BinaryTreeNodeC()
Constructor.

BinaryTreeNodeC(const KeyT & nkey,const DataT & ndata,int nbalance = 0,bool ndel = false)
Constructor.

~BinaryTreeNodeC()
Destructor.

BinaryTreeNodeC<KeyT,DataT> * Copy() const
Copy this node and its child nodes.

BinaryTreeNodeC *& Child0()
Access child 0 ptr.

BinaryTreeNodeC *& Child1()
Access child 1 ptr.

const KeyT & Key() const
Access key for this node.

DataT & Data()
Access data at this node.

const DataT & Data() const
Access data at this node.

bool IsDeleted() const
Test if node has been deleted.

void SetDeleted(bool val)
Set deleted flag.

IntT & Balance()
Access balance counter.
This is used be derived classes for keeping the tree balanced, its not used for simple binary tree's.

IntT ChildBalance0() const
Get the balance of the child 0.
if no child exists, the balance is -1.

IntT ChildBalance1() const
Get the balance of the child 1.
if no child exists, the balance is -1.

void Dump(ostream & out,int level = 0)
Dump node in human readable format.


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002