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

A simple & efficient Heap class. More...

#include <OpenListB.h>

Public Member Functions

 OpenListB ()
 
 ~OpenListB ()
 
void reset ()
 Remove all objects from queue. More...
 
void Add (OBJ val)
 Add object into OpenListB. 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 (OBJ val)
 Returns true if the object is in the OpenListB. More...
 
OBJ Remove ()
 Remove the item with the lowest key from the OpenListB & re-heapify. More...
 
void pop ()
 
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 OpenListB. More...
 
unsigned size ()
 
OBJ FindSpecialMin (double F)
 
OBJ FindTieFMin (double F)
 

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 SpecialKey, class CmpKeyStrictExtract>
class OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >

A simple & efficient Heap class.

Definition at line 28 of file OpenListB.h.

Member Typedef Documentation

◆ IndexTable

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

Definition at line 51 of file OpenListB.h.

Constructor & Destructor Documentation

◆ OpenListB()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::OpenListB

Definition at line 57 of file OpenListB.h.

◆ ~OpenListB()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::~OpenListB

Definition at line 62 of file OpenListB.h.

Member Function Documentation

◆ Add()

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

Add object into OpenListB.

Definition at line 80 of file OpenListB.h.

◆ DecreaseKey()

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

Indicate that the key for a particular object has decreased.

Definition at line 95 of file OpenListB.h.

◆ Empty()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
bool OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::Empty

Returns true if no items are in the OpenListB.

Definition at line 164 of file OpenListB.h.

◆ find()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OBJ OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::find ( OBJ  val)

find this object in the Heap and return

Definition at line 153 of file OpenListB.h.

◆ FindSpecialMin()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OBJ OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::FindSpecialMin ( double  F)

Definition at line 239 of file OpenListB.h.

◆ FindTieFMin()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OBJ OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::FindTieFMin ( double  F)

Definition at line 282 of file OpenListB.h.

◆ HeapifyDown()

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

Definition at line 205 of file OpenListB.h.

◆ HeapifyUp()

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

‍**

Definition at line 185 of file OpenListB.h.

◆ IncreaseKey()

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

Indicate that the key for a particular object has increased.

Definition at line 108 of file OpenListB.h.

◆ IsIn()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
bool OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::IsIn ( OBJ  val)

Returns true if the object is in the OpenListB.

Definition at line 120 of file OpenListB.h.

◆ pop()

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

Definition at line 38 of file OpenListB.h.

◆ Remove()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OBJ OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::Remove

◆ reset()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
void OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::reset

Remove all objects from queue.

Definition at line 70 of file OpenListB.h.

◆ size()

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

Definition at line 42 of file OpenListB.h.

◆ top()

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
OBJ OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::top ( )
inline

Definition at line 39 of file OpenListB.h.

Member Data Documentation

◆ _elts

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
std::vector<OBJ> OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::_elts
private

◆ table

template<typename OBJ , class HashKey , class EqKey , class CmpKey , class SpecialKey , class CmpKeyStrictExtract >
IndexTable OpenListB< OBJ, HashKey, EqKey, CmpKey, SpecialKey, CmpKeyStrictExtract >::table
private

Definition at line 52 of file OpenListB.h.


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