#include <FibHeap.h>
Definition at line 166 of file FibHeap.h.
◆ FibHeap()
◆ ~FibHeap()
| virtual FibHeap::~FibHeap |
( |
| ) |
|
|
virtual |
◆ AddToRootList()
◆ CascadingCut()
◆ Consolidate()
| void FibHeap::Consolidate |
( |
| ) |
|
|
private |
◆ Cut()
◆ DecreaseKey()
DecreaseKey() - O(lg n) actual; O(1) amortized
The O(lg n) actual cost stems from the fact that the depth, and therefore the number of ancestor parents, is bounded by O(lg n).
◆ Delete()
Delete() - O(lg n) amortized; ExtractMin() dominates
Notice that if we don't own the heap nodes, then we clear the m_NegInfinityFlag on the deleted node. Presumably, the programmer will be reusing the node.
◆ Exchange()
◆ ExtractMin()
◆ GetNumMarkedNodes()
| long FibHeap::GetNumMarkedNodes |
( |
| ) |
|
|
inline |
◆ GetNumNodes()
| long FibHeap::GetNumNodes |
( |
| ) |
|
|
inline |
◆ GetNumTrees()
| long FibHeap::GetNumTrees |
( |
| ) |
|
|
inline |
◆ HeapNodeFromIndex()
◆ Insert()
Insert() - O(1) actual; O(2) amortized
I am using O(2) here to indicate that although Insert() is constant time, its amortized rating is more costly because some of the work of inserting is done by other operations such as ExtractMin(), which is where tree-balancing occurs.
The child pointer is deliberately not set to nullptr because Insert() is also used internally to help put whole trees onto the root list.
◆ IsEmpty()
| bool FibHeap::IsEmpty |
( |
| ) |
|
|
inline |
◆ Link()
◆ Minimum()
◆ Print()
Print()
Used internally for debugging purposes. The function prints the key value for each node along the root list, then it calls itself on each child list.
◆ SetHeapNodes()
Set array that stores all nodes. The array is not owned by this object and must remain valid while this object is used. Nodes are stored in an array to allow referencing them using a 32-bit index instead of a 64-bit pointer. Since each node stores 4 pointer/index, this saves 16 bytes per node, which is very significant when e.g., one node corresponds to an image voxel and the image contains hundreds of millions of voxels.
◆ Union()
| void FibHeap::Union |
( |
FibHeap * | OtherHeap | ) |
|
◆ m_HeapNodes
◆ m_MinRoot
◆ m_NumMarkedNodes
| long FibHeap::m_NumMarkedNodes |
|
private |
◆ m_NumNodes
◆ m_NumTrees
The documentation for this class was generated from the following file: