All Packages Class Hierarchy This Package Previous Next Index
Class jdsltools.visualization.Wrappers.VRBTree
java.lang.Object
|
+----jdsl.core.ref.RBTree
|
+----jdsltools.visualization.Wrappers.VRBTree
- public class VRBTree
- extends RBTree
- implements BinaryTreeBased, RedBlackBased
This is a visualizable extension of jdsl.core.ref.RBTreep.
- Author:
- Ryan Shaun Baker
-
VRBTree(Comparator)
-
-
case1(Position)
- take care of case 1 after deletion: sib is red
-
case2(Position)
-
-
case3(Position)
-
-
case4(Position)
-
-
colorPromotion(Position)
- handy color promotion method.....promotes the red up
-
getBinaryTree()
-
-
getColorInfo()
-
-
insert(Locator)
- Inserts a locator into the tree.
-
newContainer()
-
-
recolor(Position)
-
-
recolorAfterRemove(Position)
-
-
remove(Locator)
-
-
replaceElement(Locator, Object)
- Replaces the element of the passed in locator
-
replaceKey(Locator, Object)
- Replaces the key of the passed in locator
-
rotation(Position)
- silly method that just calls restructure on the restructurable BT
VRBTree
public VRBTree(Comparator c)
getBinaryTree
public InspectableBinaryTree getBinaryTree()
getColorInfo
public RedBlackTreeColorInfo getColorInfo()
newContainer
public Container newContainer()
- Overrides:
- newContainer in class RBTree
insert
public void insert(Locator locator) throws InvalidKeyException, InvalidLocatorException, ContainedLocatorException
- Inserts a locator into the tree.
- Overrides:
- insert in class RBTree
remove
public void remove(Locator locator) throws InvalidLocatorException
- Overrides:
- remove in class RBTree
replaceKey
public Object replaceKey(Locator locator,
Object key) throws InvalidLocatorException, InvalidKeyException
- Replaces the key of the passed in locator
- Overrides:
- replaceKey in class RBTree
replaceElement
public Object replaceElement(Locator locator,
Object key) throws InvalidLocatorException, InvalidKeyException
- Replaces the element of the passed in locator
- Overrides:
- replaceElement in class RBTree
recolorAfterRemove
protected void recolorAfterRemove(Position child)
- Overrides:
- recolorAfterRemove in class RBTree
case1
protected void case1(Position child)
- take care of case 1 after deletion: sib is red
- Overrides:
- case1 in class RBTree
case2
protected void case2(Position child)
- Overrides:
- case2 in class RBTree
case3
protected Position case3(Position child)
- Overrides:
- case3 in class RBTree
case4
protected void case4(Position child)
- Overrides:
- case4 in class RBTree
colorPromotion
protected void colorPromotion(Position parent)
- handy color promotion method.....promotes the red up
- Overrides:
- colorPromotion in class RBTree
rotation
protected Position rotation(Position grandchild)
- silly method that just calls restructure on the restructurable BT
- Overrides:
- rotation in class RBTree
recolor
protected void recolor(Position root)
- Overrides:
- recolor in class RBTree
All Packages Class Hierarchy This Package Previous Next Index