|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmascoptLib.util.fibHeap.FibonacciHeap
The Fibonacci Heap.
Constructor Summary | |
FibonacciHeap(AbstractGraph g)
Construct the Fibonacci heap. |
Method Summary | |
Object |
deleteMin()
Remove the smallest item from the priority queue. |
void |
FibHeapDecreaseKey(FibHeapNode x,
Object k)
|
void |
FibHeapUnion(FibHeapNode fhn,
int n)
|
Object |
findMin()
Find the smallest item in the priority queue. |
FibHeapNode |
getNode(int index)
|
int |
insert(Object x)
Insert into the priority queue, maintaining heap order. |
boolean |
isEmpty()
Test if the priority queue is logically empty. |
void |
makeEmpty()
Make the priority queue logically empty. |
void |
toss(Object x)
Insert into the priority queue, without maintaining heap order. |
void |
validate()
Validate the Heap |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FibonacciHeap(AbstractGraph g)
Method Detail |
public int insert(Object x)
insert
in interface PriorityQueue
x
- the item to insert.public boolean isEmpty()
isEmpty
in interface PriorityQueue
public void makeEmpty()
makeEmpty
in interface PriorityQueue
public Object findMin() throws Underflow
findMin
in interface PriorityQueue
Underflow
- if the priority queue is empty.public void FibHeapUnion(FibHeapNode fhn, int n)
public Object deleteMin() throws Underflow
deleteMin
in interface PriorityQueue
Underflow
- if the priority queue is empty.public void toss(Object x)
toss
in interface PriorityQueue
x
- the item to insert.public void validate()
validate
in interface PriorityQueue
public void FibHeapDecreaseKey(FibHeapNode x, Object k) throws Underflow
Underflow
public FibHeapNode getNode(int index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |