| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--org.jutil.java.collections.AbstractDispenser
        |
        +--org.jutil.java.collections.AbstractPriorityQueue
              |
              +--org.jutil.java.collections.BinomialHeap
A BinomialHeap is a Heap with most of its operations O(1) or O(log(1)).
| Fields inherited from class org.jutil.java.collections.AbstractPriorityQueue | 
| CVS_REVISION | 
| Constructor Summary | |
| BinomialHeap(java.util.Comparator comparator)Initialize a new BinomialHeap with the given comparator. | |
| BinomialHeap(java.util.Comparator comparator,
             java.lang.Object root)Initialize a new BinomialHeap with the given comparator and element. | |
| Method Summary | |
| protected  void | addImpl(java.lang.Object value)See superclass. O(log(n)) | 
|  void | clear()See superclass | 
|  java.util.Comparator | getComparator()See superclass. | 
|  void | merge(BinomialHeap heap)Add all elements in the given BinomialHeap to this heap and empty that heap. | 
|  java.lang.Object | min()See superclass. O(1) | 
|  int | nbExplicitOccurrences(java.lang.Object element)See superclass. O(n) | 
|  java.lang.Object | pop()See superclass. O(log(n)) | 
|  int | size()See superclass. | 
| Methods inherited from class org.jutil.java.collections.AbstractPriorityQueue | 
| getNext, removeNext | 
| Methods inherited from class org.jutil.java.collections.AbstractDispenser | 
| add, isEmpty | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.jutil.java.collections.Dispenser | 
| add, isEmpty | 
| Constructor Detail | 
public BinomialHeap(java.util.Comparator comparator)
comparator - The comparator that is used to determine the order
        of the elements.
public BinomialHeap(java.util.Comparator comparator,
                    java.lang.Object root)
comparator - The comparator that is used to determine the order
        of the elements.root - The initial element in the new BinomialHeap.| Method Detail | 
public java.util.Comparator getComparator()
See superclass.
protected void addImpl(java.lang.Object value)
See superclass.
O(log(n))
public java.lang.Object min()
See superclass.
O(1)
public java.lang.Object pop()
See superclass.
O(log(n))
public void merge(BinomialHeap heap)
Add all elements in the given BinomialHeap to this heap and empty that heap.
heap - The heap of which the elements are to be added to this heap.
        
 O(log((n))
public void clear()
See superclass
public int nbExplicitOccurrences(java.lang.Object element)
See superclass.
O(n)
public int size()
See superclass.
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||