References
api
summary | ||
public |
V empty: * Same as RedBlackTree.empty. |
debug
deletion
summary | ||
public |
F delete_case0(n: Node): Node Preconditions:
|
|
public |
F delete_case1(n: Node): Node Preconditions:
|
|
public |
F delete_case2(n: Node): Node Preconditions:
|
|
public |
F delete_case5(n: Node): Node Preconditions:
|
|
public |
F delete_no_child(n: Node): Node Delete a node |
|
public |
F delete_one_child(n: Node) Delete a node |
|
public |
Prune subtree rooted at input node. |
|
public |
F replace_node(A: Node, B: Node) Replaces node |
family
summary | ||
public |
F grandparent(node: Node): Node Computes the grandparent (parent of parent) of the input node. |
|
public |
F predecessor(node: Node): Node Computes the predecessor of the input node, in the subtree rooted at the input node, when this predecessor is guaranteed to exist. |
|
public |
Computes the sibling of the input node. |
|
public |
Computes the uncle of the input node when the grandparent is guaranteed to exist. |
insertion
summary | ||
public |
Walks the tree rooted at |
|
public |
F insert_case0(n: Node): Node Preconditions:
|
|
public |
F insert_case1(n: Node): Node Preconditions:
|
|
public |
F insert_case2(n: Node): Node Preconditions:
|
|
public |
F insert_case3(n: Node): Node Preconditions:
|
|
public |
F insert_case4(n: Node): Node Preconditions:
|
rotate
summary | ||
public |
F rotate_left(A: Node) Rotate tree left. |
|
public |
F rotate_right(B: Node) Rotate tree right. |
search
swap
summary | ||
public |
F swap_color(A: Node, B: Node) Swap colors of two arbitrary nodes. |
|
public |
Swap pointers and colors of a node and its left child B with one constraint:
NOTE: This constraint is implied because B is A's in-subtree predecessor. |
|
public |
F swap_non_adjacent(A: Node, B: Node) Swap pointers and colors of two NON-ADJACENT nodes with three constraints:
NOTE: These three constraints are implied because B is A's in-subtree predecessor without being A's left child.
|
traversal
summary | ||
public |
F * inordertraversal(node: Node): IterableIterator Traverses the tree rooted at |
|
public |
F * leftOpenRangeTraversal(compare: Function, root: Node, right: any): IterableIterator Yields all the keys in the tree rooted at |
|
public |
F * rangetraversal(compare: Function, root: Node, left: any, right: any): IterableIterator Yields all the keys in the tree rooted at |
|
public |
F * rightOpenRangeTraversal(compare: Function, root: Node, left: any): IterableIterator Yields all the keys in the tree rooted at |
types
summary | ||
public |
A RedBlackTree with key-only nodes. |
|
public |
An internal node. |