Modifier and Type | Method and Description |
---|---|
RedBlackNode |
RedBlackNode.getLc()
The getLc() method returns the left child of the RedBlackNode.
|
RedBlackNode |
RedBlackNode.getP()
The getP() method returns the parent of the RedBlackNode.
|
RedBlackNode |
RedBlackNode.getRc()
The getRc() method returns the right child of the RedBlackNode.
|
Modifier and Type | Method and Description |
---|---|
int |
RedBlackTree.height(RedBlackNode t)
This a recursive routine that is used to compute
the height of the red black tree.
|
void |
RedBlackTree.inOrderTraversal(RedBlackNode t)
Perfrom an inorder traversal of the tree.
|
void |
RedBlackTree.leftRotate(RedBlackNode x)
leftRotate() performs a single left rotation.
|
void |
RedBlackTree.RBInsertFixup(RedBlackNode z)
Fixing up the tree so that Red Black Properties
are preserved.
|
void |
RedBlackTree.reverseOrderTraversal(RedBlackNode t)
Perform a reverseOrder traversal of the tree.
|
void |
RedBlackTree.rightRotate(RedBlackNode x)
rightRotate() performs a single right rotation
This would normally be a private method.
|
void |
RedBlackNode.setLc(RedBlackNode lc)
The setLc() method sets the left child of the RedBlackNode.
|
void |
RedBlackNode.setP(RedBlackNode p)
The setP() method sets the parent of the RedBlackNode.
|
void |
RedBlackNode.setRc(RedBlackNode rc)
The setRc() method sets the right child of the RedBlackNode.
|
Constructor and Description |
---|
RedBlackNode(java.lang.String data,
int color,
RedBlackNode p,
RedBlackNode lc,
RedBlackNode rc)
Construct a RedBlackNode with data, color, parent pointer, left child pointer
and right child pointer.
|