com.mhhe.clrs2e
Class BinomialHeap.Handle

java.lang.Object
  |
  +--com.mhhe.clrs2e.BinomialHeap.Handle
Enclosing class:
BinomialHeap

private static class BinomialHeap.Handle
extends java.lang.Object

Inner class for the handle given back to the caller upon an insertion. We cannot just use a pointer to a Node because the BinomialHeap.decreaseKey(java.lang.Object, java.lang.Comparable) and BinomialHeap.delete(java.lang.Object) operations move information around, and Node pointers may go stale. A Handle and a Node reference each other.


Field Summary
 BinomialHeap.Node node
          The Node referenced by this Handle.
 
Constructor Summary
BinomialHeap.Handle(BinomialHeap.Node n)
          Saves the node in this Handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

public BinomialHeap.Node node
The Node referenced by this Handle.

Constructor Detail

BinomialHeap.Handle

public BinomialHeap.Handle(BinomialHeap.Node n)
Saves the node in this Handle.