- new FibonacciHeap()
new FibonacciHeap() #
Creates a new instance of a Fibonacci Heap.
Inserts a new data element into the heap. No heap consolidation is performed at this time, the new node is simply inserted into the root list of this heap. Running time: O(1) actual.
Returns the number of nodes in heap. Running time: O(1) actual.
Removes all elements from this heap.
Returns true if the heap is empty, otherwise false.
Extracts the node with minimum key from heap. Amortized running time: O(log n).
Removes a node from the heap given the reference to the node. The trees in the heap will be consolidated, if necessary. This operation may fail to remove the correct element if there are nodes with key value -Infinity. Running time: O(log n) amortized.
Decreases the key value for a heap node, given the new value to take on. The structure of the heap may be changed and will not be consolidated. Running time: O(1) amortized.
The reverse of the link operation: removes node from the child list of parent. This method assumes that min is non-null. Running time: O(1).
Performs a cascading cut operation. This cuts node from its parent and then does the same for its parent, and so on up the tree. Running time: O(log n); O(1) excluding the recursion.
Make the first node a child of the second one. Running time: O(1) actual.
Kind: static method of