com.mhhe.clrs2e
Class IntervalTree.Node

java.lang.Object
  |
  +--com.mhhe.clrs2e.BinarySearchTree.Node
        |
        +--com.mhhe.clrs2e.RedBlackTree.Node
              |
              +--com.mhhe.clrs2e.IntervalTree.Node
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
IntervalTree

protected class IntervalTree.Node
extends RedBlackTree.Node

Inner class for an interval tree node, extending a red-black tree node with an additional max field. IntervalTree.Node contains an Interval as its data and has as auxiliary data a double, max, which is the maximum value of right endpoints for the subtree of which a particular node is the root.


Field Summary
protected  double max
          Maximum value in the subtree rooted at this node.
 
Fields inherited from class com.mhhe.clrs2e.RedBlackTree.Node
color
 
Fields inherited from class com.mhhe.clrs2e.BinarySearchTree.Node
data, left, parent, right
 
Constructor Summary
IntervalTree.Node(com.mhhe.clrs2e.Interval i)
          Initializes a new node in an interval tree.
 
Method Summary
 java.lang.String toString()
          Returns the String representation of this node.
 
Methods inherited from class com.mhhe.clrs2e.BinarySearchTree.Node
compareTo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

max

protected double max
Maximum value in the subtree rooted at this node.

Constructor Detail

IntervalTree.Node

public IntervalTree.Node(com.mhhe.clrs2e.Interval i)
Initializes a new node in an interval tree.

Parameters:
i - The interval stored in the node.
Method Detail

toString

public java.lang.String toString()
Returns the String representation of this node.

Overrides:
toString in class RedBlackTree.Node