|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectzombie.core.utils.FibonacciHeap<T>
public final class FibonacciHeap<T>
A class representing a Fibonacci heap.
| Nested Class Summary | |
|---|---|
static class |
FibonacciHeap.Entry<T>
|
| Constructor Summary | |
|---|---|
FibonacciHeap()
|
|
| Method Summary | ||
|---|---|---|
void |
decreaseKey(FibonacciHeap.Entry<T> entry,
double newPriority)
Decreases the key of the specified element to the new priority. |
|
void |
delete(FibonacciHeap.Entry<T> entry)
Deletes this Entry from the Fibonacci heap that contains it. |
|
void |
delete(int threadID,
AStarPathMap.Node node)
|
|
FibonacciHeap.Entry<T> |
dequeueMin()
Dequeues and returns the minimum element of the Fibonacci heap. |
|
void |
empty()
|
|
FibonacciHeap.Entry<T> |
enqueue(T value,
double priority)
Inserts the specified element into the Fibonacci heap with the specified priority. |
|
boolean |
isEmpty()
Returns whether the heap is empty. |
|
static
|
merge(FibonacciHeap<T> one,
FibonacciHeap<T> two)
Given two Fibonacci heaps, returns a new Fibonacci heap that contains all of the elements of the two heaps. |
|
FibonacciHeap.Entry<T> |
min()
Returns an Entry object corresponding to the minimum element of the Fibonacci heap, throwing a NoSuchElementException if the heap is empty. |
|
int |
size()
Returns the number of elements in the heap. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FibonacciHeap()
| Method Detail |
|---|
public void empty()
public FibonacciHeap.Entry<T> enqueue(T value,
double priority)
value - The value to insert.priority - Its priority, which must be valid.
public FibonacciHeap.Entry<T> min()
java.util.NoSuchElementException - If the heap is empty.public boolean isEmpty()
public int size()
public static <T> FibonacciHeap<T> merge(FibonacciHeap<T> one,
FibonacciHeap<T> two)
one - The first Fibonacci heap to merge.two - The second Fibonacci heap to merge.
public FibonacciHeap.Entry<T> dequeueMin()
java.util.NoSuchElementException - If the heap is empty.
public void decreaseKey(FibonacciHeap.Entry<T> entry,
double newPriority)
entry - The element whose priority should be decreased.newPriority - The new priority to associate with this entry.
java.lang.IllegalArgumentException - If the new priority exceeds the old
priority, or if the argument is not a finite double.public void delete(FibonacciHeap.Entry<T> entry)
entry - The entry to delete.
public void delete(int threadID,
AStarPathMap.Node node)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||