class BalancedTree

Red-black tree for symbol table objects.

Public Methods

[more] BalancedTree()
Default constructor
[more] ~BalancedTree()
Destructor
[more]statusEnum insertItem(keyType* , recType* )
SymbolTable-friendly wrapper for insertNode()
[more]statusEnum deleteItem(keyType* )
SymbolTable-friendly wrapper for deleteNode()
[more]statusEnum findSymbol(const keyType* , recType* &)
Given a key, find the symbol
[more]nodeType* treeMinimum(nodeType* )
Find minimum in subtree, used by fixup routines
[more]nodeType* treeSuccessor(nodeType* )
Find successor in subtree, used by fixup routines
[more]nodeType* treeMaximum(nodeType* )
Find maximum in subtree, used by fixup routines
[more]nodeType* search(const keyType* , nodeType* = 0)
Basic recursive search routine
[more]int isRoot(nodeType* n)
Is this the root node?
[more]int isNil(nodeType* n)
is this the nil node?
[more]ostream& dumpNode(ostream &, char* , nodeType* = 0)
Routine for recursive dump of nodes


Documentation

Red-black tree for symbol table objects. Algorithm shamelessly grabbed from our betters -- namely Cormen, et al.
o BalancedTree()
Default constructor

o ~BalancedTree()
Destructor

ostatusEnum insertItem(keyType* , recType* )
SymbolTable-friendly wrapper for insertNode()

ostatusEnum deleteItem(keyType* )
SymbolTable-friendly wrapper for deleteNode()

ostatusEnum findSymbol(const keyType* , recType* &)
Given a key, find the symbol

onodeType* treeMinimum(nodeType* )
Find minimum in subtree, used by fixup routines

onodeType* treeSuccessor(nodeType* )
Find successor in subtree, used by fixup routines

onodeType* treeMaximum(nodeType* )
Find maximum in subtree, used by fixup routines

onodeType* search(const keyType* , nodeType* = 0)
Basic recursive search routine

oint isRoot(nodeType* n)
Is this the root node?

oint isNil(nodeType* n)
is this the nil node?

oostream& dumpNode(ostream &, char* , nodeType* = 0)
Routine for recursive dump of nodes


This class has no child classes.
Friends:
ostream &operator<<(ostream &, BalancedTree &)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.