FibHeap Class Reference

An abstract definition of a fibonacci heap. More...

#include </usr1/tp517/Tumble/trunk/src/tumble/fibheap.h>

Collaboration diagram for FibHeap:

[legend]
List of all members.

Public Member Functions

 FibHeap ()
virtual ~FibHeap ()
void Insert (FibHeapNode *NewNode)
void Union (FibHeap *OtherHeap)
FibHeapNodeMinimum ()
FibHeapNodeExtractMin ()
int DecreaseKey (FibHeapNode *theNode, FibHeapNode &NewKey)
int Delete (FibHeapNode *theNode)
int GetHeapOwnership ()
void SetHeapOwnership ()
void ClearHeapOwnership ()
long GetNumNodes ()
long GetNumTrees ()
long GetNumMarkedNodes ()
void Print (FibHeapNode *Tree=NULL, FibHeapNode *theParent=NULL)

Private Member Functions

void _Exchange (FibHeapNode *&N1, FibHeapNode *&N2)
void _Consolidate ()
void _Link (FibHeapNode *, FibHeapNode *)
void _AddToRootList (FibHeapNode *)
void _Cut (FibHeapNode *, FibHeapNode *)
void _CascadingCut (FibHeapNode *)

Private Attributes

FibHeapNodeMinRoot
long NumNodes
long NumTrees
long NumMarkedNodes
int HeapOwnershipFlag

Detailed Description

An abstract definition of a fibonacci heap.

Definition at line 70 of file fibheap.h.


Constructor & Destructor Documentation

FibHeap::FibHeap (  ) 

Definition at line 172 of file fibheap.C.

References ClearHeapOwnership(), MinRoot, NumMarkedNodes, NumNodes, and NumTrees.

Referenced by ExtractMin().

Here is the call graph for this function:

FibHeap::~FibHeap (  )  [virtual]

Definition at line 183 of file fibheap.C.

References ExtractMin(), GetHeapOwnership(), and MinRoot.

Here is the call graph for this function:


Member Function Documentation

void FibHeap::Insert ( FibHeapNode NewNode  ) 

Definition at line 209 of file fibheap.C.

References FibHeapNode::Left, MinRoot, NumNodes, NumTrees, FibHeapNode::Parent, and FibHeapNode::Right.

Referenced by _AddToRootList(), and FHeap< Data >::decrease().

void FibHeap::Union ( FibHeap OtherHeap  ) 

Definition at line 249 of file fibheap.C.

References FibHeapNode::Left, MinRoot, NumMarkedNodes, NumNodes, NumTrees, and FibHeapNode::Right.

Referenced by ExtractMin().

FibHeapNode* FibHeap::Minimum (  )  [inline]

Definition at line 87 of file fibheap.h.

References MinRoot.

Referenced by FHeap< Data >::empty(), and ExtractMin().

FibHeapNode * FibHeap::ExtractMin (  ) 

Definition at line 310 of file fibheap.C.

References _Consolidate(), FibHeapNode::Child, FibHeapNode::Degree, FibHeap(), FibHeapNode::Left, FibHeapNode::Mark, Minimum(), MinRoot, NumMarkedNodes, NumNodes, FibHeapNode::Parent, FibHeapNode::Right, and Union().

Referenced by Delete(), FHeap< Data >::rem_min(), and ~FibHeap().

Here is the call graph for this function:

int FibHeap::DecreaseKey ( FibHeapNode theNode,
FibHeapNode NewKey 
)

Definition at line 389 of file fibheap.C.

References _CascadingCut(), _Cut(), MinRoot, NOTOK, OK, and FibHeapNode::Parent.

Referenced by FHeap< Data >::decrease(), and Delete().

Here is the call graph for this function:

int FibHeap::Delete ( FibHeapNode theNode  ) 

Definition at line 419 of file fibheap.C.

References DecreaseKey(), ExtractMin(), GetHeapOwnership(), FibHeapNode::NegInfinityFlag, NOTOK, and OK.

Here is the call graph for this function:

int FibHeap::GetHeapOwnership (  )  [inline]

Definition at line 97 of file fibheap.h.

References HeapOwnershipFlag.

Referenced by Delete(), and ~FibHeap().

void FibHeap::SetHeapOwnership (  )  [inline]

Definition at line 98 of file fibheap.h.

References HeapOwnershipFlag.

void FibHeap::ClearHeapOwnership (  )  [inline]

Definition at line 99 of file fibheap.h.

References HeapOwnershipFlag.

Referenced by FibHeap().

long FibHeap::GetNumNodes (  )  [inline]

Definition at line 101 of file fibheap.h.

References NumNodes.

long FibHeap::GetNumTrees (  )  [inline]

Definition at line 102 of file fibheap.h.

References NumTrees.

long FibHeap::GetNumMarkedNodes (  )  [inline]

Definition at line 103 of file fibheap.h.

References NumMarkedNodes.

void FibHeap::Print ( FibHeapNode Tree = NULL,
FibHeapNode theParent = NULL 
)

Definition at line 451 of file fibheap.C.

References FibHeapNode::Child, FibHeapNode::Left, MinRoot, FibHeapNode::Parent, FibHeapNode::Print(), and FibHeapNode::Right.

Here is the call graph for this function:

void FibHeap::_Exchange ( FibHeapNode *&  N1,
FibHeapNode *&  N2 
) [inline, private]

Definition at line 111 of file fibheap.h.

Referenced by _Consolidate().

void FibHeap::_Consolidate (  )  [private]

Definition at line 534 of file fibheap.C.

References _AddToRootList(), _Exchange(), _Link(), FibHeapNode::Degree, FibHeapNode::Left, MinRoot, NumTrees, and FibHeapNode::Right.

Referenced by ExtractMin().

Here is the call graph for this function:

void FibHeap::_Link ( FibHeapNode ,
FibHeapNode  
) [private]

Definition at line 601 of file fibheap.C.

References FibHeapNode::Child, FibHeapNode::Degree, FibHeapNode::Left, FibHeapNode::Mark, NumMarkedNodes, NumTrees, FibHeapNode::Parent, and FibHeapNode::Right.

Referenced by _Consolidate().

void FibHeap::_AddToRootList ( FibHeapNode  )  [private]

Definition at line 644 of file fibheap.C.

References Insert(), FibHeapNode::Mark, NumMarkedNodes, and NumNodes.

Referenced by _Consolidate(), and _Cut().

Here is the call graph for this function:

void FibHeap::_Cut ( FibHeapNode ,
FibHeapNode  
) [private]

Definition at line 657 of file fibheap.C.

References _AddToRootList(), FibHeapNode::Child, FibHeapNode::Degree, FibHeapNode::Left, and FibHeapNode::Right.

Referenced by _CascadingCut(), and DecreaseKey().

Here is the call graph for this function:

void FibHeap::_CascadingCut ( FibHeapNode  )  [private]

Definition at line 682 of file fibheap.C.

References _Cut(), FibHeapNode::Mark, NumMarkedNodes, and FibHeapNode::Parent.

Referenced by DecreaseKey().

Here is the call graph for this function:


Member Data Documentation

FibHeapNode* FibHeap::MinRoot [private]

Definition at line 72 of file fibheap.h.

Referenced by _Consolidate(), DecreaseKey(), ExtractMin(), FibHeap(), Insert(), Minimum(), Print(), Union(), and ~FibHeap().

long FibHeap::NumNodes [private]

Definition at line 73 of file fibheap.h.

Referenced by _AddToRootList(), ExtractMin(), FibHeap(), GetNumNodes(), Insert(), and Union().

long FibHeap::NumTrees [private]

Definition at line 73 of file fibheap.h.

Referenced by _Consolidate(), _Link(), FibHeap(), GetNumTrees(), Insert(), and Union().

long FibHeap::NumMarkedNodes [private]

Definition at line 73 of file fibheap.h.

Referenced by _AddToRootList(), _CascadingCut(), _Link(), ExtractMin(), FibHeap(), GetNumMarkedNodes(), and Union().

int FibHeap::HeapOwnershipFlag [private]

Definition at line 75 of file fibheap.h.

Referenced by ClearHeapOwnership(), GetHeapOwnership(), and SetHeapOwnership().


The documentation for this class was generated from the following files:
Generated on Mon May 24 09:53:34 2010 for TUMBLE by  doxygen 1.5.2