Package | Description |
---|---|
cnslab.cnsmath |
Modifier and Type | Field and Description |
---|---|
protected RBCell |
RBCell.left_
Pointer to left child
|
protected RBCell |
RBCell.right_
Pointer to right child
|
Modifier and Type | Method and Description |
---|---|
RBCell |
RBCell.delete(RBCell root)
Delete the current node, and then rebalance the tree it is in
|
RBCell |
RBCell.find(T element)
Return node of current subtree containing element as element(),
if it exists, else null.
|
protected RBCell |
RBCell.fixAfterDeletion(RBCell root)
From CLR
|
protected RBCell |
RBCell.fixAfterInsertion(RBCell root)
From CLR
|
RBCell |
RBCell.insertLeft(RBCell cell,
RBCell root)
There's no generic element insertion.
|
RBCell |
RBCell.insertRight(RBCell cell,
RBCell root)
Insert cell as the right child of current node, and then
rebalance the tree it is in.
|
RBCell |
RBCell.left()
Return left child (or null)
|
RBCell |
RBCell.leftmost()
Return the minimum element of the current (sub)tree
|
RBCell |
RBCell.parent()
Return parent (or null)
|
RBCell<T> |
RBCell.predecessor()
Return the inorder predecessor, or null if no such
|
RBCell |
RBCell.right()
Return right child (or null)
|
RBCell |
RBCell.rightmost()
Return the maximum element of the current (sub)tree
|
RBCell<T> |
RBTree.root()
Returns the root of the tree.
|
RBCell |
RBCell.root()
Return the root (parentless node) of the tree
|
protected RBCell |
RBCell.rotateLeft(RBCell root)
From CLR
|
protected RBCell |
RBCell.rotateRight(RBCell root)
From CLR
|
RBCell<T> |
RBCell.successor()
Return the inorder successor, or null if no such
|
RBCell<T> |
RBCell.treeMaximum() |
RBCell<T> |
RBCell.treeMinimum()
Searches a node with smallest key starting from the node x which is usually the root.
|
Modifier and Type | Method and Description |
---|---|
RBCell |
RBCell.delete(RBCell root)
Delete the current node, and then rebalance the tree it is in
|
protected RBCell |
RBCell.fixAfterDeletion(RBCell root)
From CLR
|
protected RBCell |
RBCell.fixAfterInsertion(RBCell root)
From CLR
|
void |
RBTree.inorderTreeWalk(RBCell<T> x,
PrintStream p)
Prints the keys of current tree in inorder (ascending).
|
void |
RBTree.inorderTreeWalk(RBCell<T> x,
StringWrap p) |
RBCell |
RBCell.insertLeft(RBCell cell,
RBCell root)
There's no generic element insertion.
|
RBCell |
RBCell.insertLeft(RBCell cell,
RBCell root)
There's no generic element insertion.
|
RBCell |
RBCell.insertRight(RBCell cell,
RBCell root)
Insert cell as the right child of current node, and then
rebalance the tree it is in.
|
RBCell |
RBCell.insertRight(RBCell cell,
RBCell root)
Insert cell as the right child of current node, and then
rebalance the tree it is in.
|
protected RBCell |
RBCell.rotateLeft(RBCell root)
From CLR
|
protected RBCell |
RBCell.rotateRight(RBCell root)
From CLR
|
boolean |
RBTree.treeNoTillFireEvent(RBCell<T> x) |
boolean |
RBTree.treeNoTillFireEvent2(RBCell<T> x) |
boolean |
RBTree.treeNoTillInputEvent(RBCell<T> x) |
Constructor and Description |
---|
RBTree(RBCell<T> x)
Constructs a new tree with a root node x.
|