net.cscott.jutil
public class RedBlackTree extends BinaryTree
See Also: "CLR section 14, (page 263)."
Nested Class Summary | |
---|---|
protected class | RedBlackTree.RBNode A RBNode is an element of this tree. |
Constructor Summary | |
---|---|
RedBlackTree() | |
RedBlackTree(Comparator c) |
Method Summary | |
---|---|
protected void | deleteNode(Node z) |
protected void | insertNode(Node x) |
protected void | leftRotate(Node x) Pivots around the edge (x,x.right).
|
static void | main(String[] args) |
protected Node | makeNode(Object o) Factory method for Node. |
protected void | rbDeleteFixup(Node x) Post delete fixup routine. |
protected void | rightRotate(Node x) Pivots around the edge (x,x.left).
|
protected void | swapPositions(Node a, Node b) |
See Also: "CLR, pg. 274"