| Package | flare.util.heap |
| Class | public class FibonacciHeap |
| Property | Defined by | ||
|---|---|---|---|
| empty : Boolean [read-only] True if the heap is empty, false otherwise.
| FibonacciHeap | ||
| size : int [read-only] The number of nodes contained in this heap.
| FibonacciHeap | ||
| Method | Defined by | ||
|---|---|---|---|
|
clear():void
Clears the heap, removing all nodes.
| FibonacciHeap | ||
|
decreaseKey(x:HeapNode, k:Number):void
Decrease the key value for a heap node, changing its key and
potentially re-configuring the heap structure
| FibonacciHeap | ||
|
Inserts a new node into the heap.
| FibonacciHeap | ||
|
Returns the heap node with the minimum key value.
| FibonacciHeap | ||
|
Removes a node from the heap.
| FibonacciHeap | ||
|
Removes and returns the heap node with the minimum key value.
| FibonacciHeap | ||
|
[static]
Constructs the union of two fibonacci heaps.
| FibonacciHeap | ||
| empty | property |
empty:Boolean [read-only]True if the heap is empty, false otherwise.
Implementation public function get empty():Boolean
| size | property |
size:int [read-only]The number of nodes contained in this heap.
Implementation public function get size():int
| clear | () | method |
public function clear():voidClears the heap, removing all nodes.
| decreaseKey | () | method |
public function decreaseKey(x:HeapNode, k:Number):voidDecrease the key value for a heap node, changing its key and potentially re-configuring the heap structure
Parametersx:HeapNode — the heap node
|
|
k:Number — the new key value for the node. If this value is greater
than the node's current key value an error will be thrown.
|
| insert | () | method |
public function insert(data:Object, key:Number):HeapNodeInserts a new node into the heap.
Parametersdata:Object — the data to associate with the heap node
|
|
key:Number — the key value used to sort the heap node
|
HeapNode —
the newly added heap node
|
| min | () | method |
public function min():HeapNodeReturns the heap node with the minimum key value.
ReturnsHeapNode —
the heap node with the minimum key value
|
| remove | () | method |
public function remove(x:HeapNode):voidRemoves a node from the heap.
Parametersx:HeapNode — the heap node to remove
|
| removeMin | () | method |
public function removeMin():HeapNodeRemoves and returns the heap node with the minimum key value.
ReturnsHeapNode —
the heap node with the minimum key value
|
| union | () | method |
public static function union(h1:FibonacciHeap, h2:FibonacciHeap):FibonacciHeapConstructs the union of two fibonacci heaps.
Parametersh1:FibonacciHeap — the first heap
|
|
h2:FibonacciHeap — the second heap
|
FibonacciHeap —
the union of the two heaps
|