PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MinHeap Class Reference

#include "MinHeap.h"

Public Member Functions

 MinHeap (int maxNode)
 
 MinHeap (int maxNode)
 
 ~MinHeap (void)
 
 ~MinHeap (void)
 
bool empty ()
 
bool empty ()
 
bool init (int maxNode)
 
bool init (int maxNode)
 
void pop ()
 
void pop ()
 
void push (PDI node)
 
void push (PDI node)
 
bool reset (void)
 
bool reset (void)
 
PDI top ()
 
PDI top ()
 

Private Member Functions

void shift_down (int node)
 
void shift_down (int node)
 
void shift_up (int node)
 
void shift_up (int node)
 

Private Attributes

int m_CurrentSize
 
PDIm_HeapTree
 
int * m_Index
 
int m_MaxNodeID
 

Detailed Description

Definition at line 43 of file src/MinHeap.h.

Constructor & Destructor Documentation

MinHeap::MinHeap ( int  maxNode)
explicit

Definition at line 40 of file src/MinHeap.cpp.

References init().

MinHeap::~MinHeap ( void  )

Definition at line 44 of file src/MinHeap.cpp.

References reset().

MinHeap::MinHeap ( int  maxNode)
MinHeap::~MinHeap ( void  )

Member Function Documentation

bool MinHeap::empty ( void  )

Definition at line 92 of file src/MinHeap.cpp.

References m_CurrentSize.

Referenced by BiDirAStar::bidir_astar().

bool MinHeap::empty ( )
bool MinHeap::init ( int  maxNode)

Definition at line 60 of file src/MinHeap.cpp.

References m_CurrentSize, m_HeapTree, m_Index, m_MaxNodeID, and maxNode.

Referenced by MinHeap().

bool MinHeap::init ( int  maxNode)
void MinHeap::pop ( void  )

Definition at line 98 of file src/MinHeap.cpp.

References m_CurrentSize, m_HeapTree, m_Index, and shift_down().

Referenced by BiDirAStar::bidir_astar().

void MinHeap::pop ( )
void MinHeap::push ( PDI  node)

Definition at line 69 of file src/MinHeap.cpp.

References m_CurrentSize, m_HeapTree, m_Index, and shift_up().

Referenced by BiDirAStar::bidir_astar(), and BiDirAStar::explore().

void MinHeap::push ( PDI  node)
bool MinHeap::reset ( void  )

Definition at line 48 of file src/MinHeap.cpp.

References m_HeapTree, and m_Index.

Referenced by ~MinHeap().

bool MinHeap::reset ( void  )
void MinHeap::shift_down ( int  node)
private

Definition at line 125 of file src/MinHeap.cpp.

References m_CurrentSize, m_HeapTree, and m_Index.

Referenced by pop().

void MinHeap::shift_down ( int  node)
private
void MinHeap::shift_up ( int  node)
private

Definition at line 109 of file src/MinHeap.cpp.

References m_HeapTree, and m_Index.

Referenced by push().

void MinHeap::shift_up ( int  node)
private
PDI MinHeap::top ( void  )

Definition at line 88 of file src/MinHeap.cpp.

References m_HeapTree.

Referenced by BiDirAStar::bidir_astar().

PDI MinHeap::top ( )

Member Data Documentation

int MinHeap::m_CurrentSize
private

Definition at line 63 of file src/MinHeap.h.

Referenced by empty(), init(), pop(), push(), and shift_down().

PDI * MinHeap::m_HeapTree
private

Definition at line 60 of file src/MinHeap.h.

Referenced by init(), pop(), push(), reset(), shift_down(), shift_up(), and top().

int * MinHeap::m_Index
private

Definition at line 61 of file src/MinHeap.h.

Referenced by init(), pop(), push(), reset(), shift_down(), and shift_up().

int MinHeap::m_MaxNodeID
private

Definition at line 62 of file src/MinHeap.h.

Referenced by init().


The documentation for this class was generated from the following files: