HOG2
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
OpenClosedList< OBJ, HashKey, EqKey, CmpKey > Class Template Reference

A simple Heap class. More...

#include <OpenClosedList.h>

Public Member Functions

 OpenClosedList ()
 
 ~OpenClosedList ()
 
void reset ()
 Remove all objects from queue. More...
 
void Add (OBJ val)
 Add object into OpenClosedList. More...
 
void DecreaseKey (OBJ val)
 Indicate that the key for a particular object has decreased. More...
 
void IncreaseKey (OBJ val)
 Indicate that the key for a particular object has increased. More...
 
bool IsIn (const OBJ val) const
 Returns true if the object is in the OpenClosedList. More...
 
OBJ Remove ()
 Remove the item with the lowest key from the OpenClosedList & re-heapify. More...
 
void pop ()
 
const OBJ peek () const
 
OBJ top ()
 
OBJ find (OBJ val)
 find this object in the Heap and return More...
 
bool Empty ()
 Returns true if no items are in the OpenClosedList. More...
 
unsigned size ()
 

Private Types

typedef std::unordered_map< OBJ, unsigned int, HashKey, EqKey > IndexTable
 

Private Member Functions

void HeapifyUp (unsigned int index)
 ‍** More...
 
void HeapifyDown (unsigned int index)
 

Private Attributes

std::vector< OBJ > _elts
 
IndexTable table
 

Detailed Description

template<typename OBJ, class HashKey, class EqKey, class CmpKey>
class OpenClosedList< OBJ, HashKey, EqKey, CmpKey >

A simple Heap class.

Definition at line 27 of file OpenClosedList.h.

Member Typedef Documentation

◆ IndexTable

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
typedef std::unordered_map<OBJ, unsigned int, HashKey, EqKey > OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IndexTable
private

Definition at line 48 of file OpenClosedList.h.

Constructor & Destructor Documentation

◆ OpenClosedList()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::OpenClosedList

Definition at line 54 of file OpenClosedList.h.

◆ ~OpenClosedList()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::~OpenClosedList

Definition at line 59 of file OpenClosedList.h.

Member Function Documentation

◆ Add()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add ( OBJ  val)

◆ DecreaseKey()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey ( OBJ  val)

◆ Empty()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
bool OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Empty

Returns true if no items are in the OpenClosedList.

Definition at line 174 of file OpenClosedList.h.

◆ find()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
OBJ OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::find ( OBJ  val)

find this object in the Heap and return

Definition at line 163 of file OpenClosedList.h.

Referenced by MeroB::DoSingleStepA(), MeroB::DoSingleStepB(), MeroB::DoSingleStepBP(), and MeroB::ExtractPathToStart().

◆ HeapifyDown()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::HeapifyDown ( unsigned int  index)
private

Definition at line 215 of file OpenClosedList.h.

◆ HeapifyUp()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::HeapifyUp ( unsigned int  index)
private

‍**

Definition at line 195 of file OpenClosedList.h.

◆ IncreaseKey()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IncreaseKey ( OBJ  val)

Indicate that the key for a particular object has increased.

Definition at line 109 of file OpenClosedList.h.

Referenced by MeroB::DoSingleStepBP().

◆ IsIn()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
bool OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn ( const OBJ  val) const

◆ peek()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
const OBJ OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::peek ( ) const
inline

◆ pop()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::pop ( )
inline

◆ Remove()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
OBJ OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Remove

◆ reset()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
void OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset

◆ size()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
unsigned OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::size ( )
inline

◆ top()

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
OBJ OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::top ( )
inline

Member Data Documentation

◆ _elts

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
std::vector<OBJ> OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::_elts
private

◆ table

template<typename OBJ , class HashKey , class EqKey , class CmpKey >
IndexTable OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::table
private

Definition at line 49 of file OpenClosedList.h.


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