edu.princeton.cs.algs4.growingtree.demos
Class LLRBDeletion<P extends RBNodeProperties>

java.lang.Object
  extended by edu.princeton.cs.algs4.growingtree.demos.LLRBOperator<P>
      extended by edu.princeton.cs.algs4.growingtree.demos.LLRBDeletion<P>
All Implemented Interfaces:
IDeleteOperator<P>

public class LLRBDeletion<P extends RBNodeProperties>
extends LLRBOperator<P>
implements IDeleteOperator<P>


Constructor Summary
LLRBDeletion()
           
 
Method Summary
 IAlgorithmNode<P> delete(IAlgorithmNode<P> h, IDeletingNode<P> key)
           
 void doDelete(IAlgorithmNode<P> root, IDeletingNode<P> node)
           
 IAlgorithmNode<P> getPostDeletionValidNode(IAlgorithmNode<P> root, IDeletingNode<P> node)
           
 
Methods inherited from class edu.princeton.cs.algs4.growingtree.demos.LLRBOperator
isRed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LLRBDeletion

public LLRBDeletion()
Method Detail

delete

public IAlgorithmNode<P> delete(IAlgorithmNode<P> h,
                                IDeletingNode<P> key)

getPostDeletionValidNode

public IAlgorithmNode<P> getPostDeletionValidNode(IAlgorithmNode<P> root,
                                                  IDeletingNode<P> node)

doDelete

public void doDelete(IAlgorithmNode<P> root,
                     IDeletingNode<P> node)
Specified by:
doDelete in interface IDeleteOperator<P extends RBNodeProperties>
Parameters:
root - The root of the tree
node - Node to be deleted