All Packages Class Hierarchy This Package Previous Next Index
Class tw.edu.ncnu.im.cnclab.DataStru.FibonacciHeap
java.lang.Object
|
+----tw.edu.ncnu.im.cnclab.DataStru.FibonacciHeap
- public class FibonacciHeap
- extends Object
- implements PriorityQueue
-
FibonacciHeap()
- Construct the Fibonacci heap.
-
deleteMin()
- Remove the smallest item from the priority queue.
-
FibHeapDecreaseKey(FibHeapNode, Comparable11)
-
-
FibHeapUnion(FibHeapNode, int)
-
-
findMin()
- Find the smallest item in the priority queue.
-
insert(Comparable11)
- Insert into the priority queue, maintaining heap order.
-
isEmpty()
- Test if the priority queue is logically empty.
-
makeEmpty()
- Make the priority queue logically empty.
-
toss(Comparable11)
- Insert into the priority queue, without maintaining
heap order.
-
validate()
- Validate the Heap
FibonacciHeap
public FibonacciHeap()
- Construct the Fibonacci heap.
insert
public void insert(Comparable11 x)
- Insert into the priority queue, maintaining heap order.
Duplicates are allowed.
- Parameters:
- x - the item to insert.
isEmpty
public boolean isEmpty()
- Test if the priority queue is logically empty.
- Returns:
- true if empty, false otherwise.
makeEmpty
public void makeEmpty()
- Make the priority queue logically empty.
findMin
public Comparable11 findMin() throws Underflow
- Find the smallest item in the priority queue.
- Returns:
- the smallest item.
- Throws: Underflow
- if the priority queue is empty.
FibHeapUnion
public void FibHeapUnion(FibHeapNode fhn,
int n)
deleteMin
public Comparable11 deleteMin() throws Underflow
- Remove the smallest item from the priority queue.
- Throws: Underflow
- if the priority queue is empty.
toss
public void toss(Comparable11 x)
- Insert into the priority queue, without maintaining
heap order. Duplicates are allowed.
- Parameters:
- x - the item to insert.
validate
public void validate()
- Validate the Heap
FibHeapDecreaseKey
public void FibHeapDecreaseKey(FibHeapNode x,
Comparable11 k) throws Underflow
All Packages Class Hierarchy This Package Previous Next Index