|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.nutch.util.FibonacciHeap
A Fibonacci Heap, as described in Introduction to Algorithms by Charles E. Leiserson, Thomas H. Cormen, Ronald L. Rivest.
A Fibonacci heap is a very efficient data structure for priority queuing.
| Constructor Summary | |
FibonacciHeap()
Creates a new FibonacciHeap. |
|
| Method Summary | |
void |
add(Object item,
int priority)
Adds the Object item, with the supplied
priority. |
boolean |
contains(Object item)
Returns true if item exists in this
FibonacciHeap, false otherwise. |
void |
decreaseKey(Object item,
int priority)
Decreases the priority value associated with
item. |
Object |
peekMin()
Returns the same Object that popMin() would, without
removing it. |
Object |
popMin()
Returns the object which has the lowest priority in the heap. |
int |
size()
Returns the number of objects in the heap. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FibonacciHeap()
FibonacciHeap.
| Method Detail |
public void add(Object item,
int priority)
item, with the supplied
priority.
public boolean contains(Object item)
true if item exists in this
FibonacciHeap, false otherwise.
public Object peekMin()
popMin() would, without
removing it.
public int size()
public Object popMin()
null is returned.
public void decreaseKey(Object item,
int priority)
priority value associated with
item.
item must exist in the heap, and it's current
priority must be greater than priority.
IllegalStateException - if item does not exist
in the heap, or if item already has an equal or
lower priority than the suppliedpriority.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||