apollo.util.interval
Class RbTree

java.lang.Object
  extended by apollo.util.interval.RbTree

public class RbTree
extends java.lang.Object


Constructor Summary
RbTree()
           
RbTree(StatisticUpdate updater)
           
 
Method Summary
 RbNode get(int key)
           
 void insert(RbNode x)
           
 boolean isValid()
          Test code: make sure that the tree has all the properties defined by Red Black trees: o.
 RbNode maximum(RbNode node)
           
 RbNode minimum(RbNode node)
           
 RbNode predecessor(RbNode x)
           
 RbNode root()
           
 int size()
          Returns the number of nodes in the tree.
 RbNode successor(RbNode x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RbTree

public RbTree(StatisticUpdate updater)

RbTree

public RbTree()
Method Detail

insert

public void insert(RbNode x)

get

public RbNode get(int key)

root

public RbNode root()

minimum

public RbNode minimum(RbNode node)

maximum

public RbNode maximum(RbNode node)

successor

public RbNode successor(RbNode x)

predecessor

public RbNode predecessor(RbNode x)

size

public int size()
Returns the number of nodes in the tree.


isValid

public boolean isValid()
Test code: make sure that the tree has all the properties defined by Red Black trees: o. Root is black. o. NIL is black. o. Red nodes have black children. o. Every path from root to leaves contains the same number of black nodes. Calling this function will be expensive, as is meant for assertion or test code.