apollo.util.interval
Class IntervalTree

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

public class IntervalTree
extends java.lang.Object


Constructor Summary
IntervalTree()
           
 
Method Summary
 Interval getInterval(RbNode node)
           
 int getMax(RbNode node)
           
 int getMin(RbNode node)
           
 void insert(Interval interval)
           
 boolean isValid()
          Test case code: check to see that the data structure follows the right constraints of interval trees: o.
 Interval search(Interval interval)
           
 java.util.List searchAll(Interval interval)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalTree

public IntervalTree()
Method Detail

insert

public void insert(Interval interval)

size

public int size()

search

public Interval search(Interval interval)

searchAll

public java.util.List searchAll(Interval interval)

getInterval

public Interval getInterval(RbNode node)

getMax

public int getMax(RbNode node)

getMin

public int getMin(RbNode node)

isValid

public boolean isValid()
Test case code: check to see that the data structure follows the right constraints of interval trees: o. They're valid red-black trees o. getMax(node) is the maximum of any interval rooted at that node.. This code is expensive, and only meant to be used for assertions and testing.