HOG2
|
#include <BDOpenClosed.h>
Public Member Functions | |
BDOpenClosed () | |
~BDOpenClosed () | |
void | Reset (int) |
Remove all objects from queue. More... | |
uint64_t | AddOpenNode (const state &val, uint64_t hash, double g, double h, uint64_t parent=kTBDNoNode, stateLocation whichQueue=kOpenWaiting) |
Add object into open list. More... | |
uint64_t | AddClosedNode (state &val, uint64_t hash, double g, double h, uint64_t parent=kTBDNoNode) |
Add object into closed list. More... | |
void | KeyChanged (uint64_t objKey) |
Indicate that the key for a particular object has changed. More... | |
void | Remove (uint64_t objKey) |
stateLocation | Lookup (uint64_t hashKey, uint64_t &objKey) const |
** More... | |
dataStructure & | Lookup (uint64_t objKey) |
const dataStructure & | Lookat (uint64_t objKey) const |
uint64_t | Peek (stateLocation whichQueue) const |
Peek at the next item to be expanded. More... | |
const dataStructure & | PeekAt (stateLocation whichQueue) const |
Peek at the next item to be expanded. More... | |
uint64_t | Close () |
Move the best item to the closed list and return key. More... | |
uint64_t | PutToReady () |
uint64_t | GetOpenItem (unsigned int which, stateLocation where) |
size_t | OpenReadySize () const |
size_t | OpenWaitingSize () const |
size_t | OpenSize () const |
size_t | ClosedSize () const |
size_t | size () const |
void | verifyData () |
bool | ValidateOpenReady (int index=0) |
bool | ValidateOpenWaiting (int index=0) |
Private Member Functions | |
bool | HeapifyUp (unsigned int index, stateLocation whichQueue) |
Moves a node up the heap. More... | |
void | HeapifyDown (unsigned int index, stateLocation whichQueue) |
Private Attributes | |
std::vector< std::vector< uint64_t > > | priorityQueues |
std::unordered_map< uint64_t, size_t > | table |
std::vector< dataStructure > | elements |
Definition at line 48 of file BDOpenClosed.h.
BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::BDOpenClosed |
Definition at line 150 of file BDOpenClosed.h.
BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::~BDOpenClosed |
Definition at line 161 of file BDOpenClosed.h.
uint64_t BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::AddClosedNode | ( | state & | val, |
uint64_t | hash, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTBDNoNode |
||
) |
Add object into closed list.
Definition at line 215 of file BDOpenClosed.h.
References kClosed, and kTBDNoNode.
uint64_t BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::AddOpenNode | ( | const state & | val, |
uint64_t | hash, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTBDNoNode , |
||
stateLocation | whichQueue = kOpenWaiting |
||
) |
Add object into open list.
Definition at line 183 of file BDOpenClosed.h.
References kOpenReady, kOpenWaiting, and kTBDNoNode.
uint64_t BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Close |
Move the best item to the closed list and return key.
Definition at line 333 of file BDOpenClosed.h.
References kClosed, and kOpenReady.
|
inline |
|
inline |
Definition at line 75 of file BDOpenClosed.h.
References BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
|
private |
Definition at line 421 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
private |
Moves a node up the heap.
Returns true if the node was moved, false otherwise.
Definition at line 382 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
void BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::KeyChanged | ( | uint64_t | objKey | ) |
Indicate that the key for a particular object has changed.
Definition at line 230 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
inline |
Definition at line 60 of file BDOpenClosed.h.
References BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
stateLocation BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookup | ( | uint64_t | hashKey, |
uint64_t & | objKey | ||
) | const |
**
Returns location of object as well as object key.
Definition at line 282 of file BDOpenClosed.h.
References kUnseen.
|
inline |
Definition at line 59 of file BDOpenClosed.h.
References BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
|
inline |
Definition at line 76 of file BDOpenClosed.h.
References kOpenReady, and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
Referenced by BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize().
|
inline |
Definition at line 78 of file BDOpenClosed.h.
References kOpenReady, kOpenWaiting, and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
|
inline |
Definition at line 77 of file BDOpenClosed.h.
References kOpenWaiting, and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
Referenced by BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize().
uint64_t BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Peek | ( | stateLocation | whichQueue | ) | const |
Peek at the next item to be expanded.
Definition at line 297 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
inline |
Peek at the next item to be expanded.
Definition at line 314 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
uint64_t BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::PutToReady |
Definition at line 349 of file BDOpenClosed.h.
References kOpenReady, and kOpenWaiting.
void BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Remove | ( | uint64_t | objKey | ) |
Definition at line 249 of file BDOpenClosed.h.
References kClosed.
void BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Reset | ( | int | ) |
Remove all objects from queue.
Definition at line 169 of file BDOpenClosed.h.
|
inline |
Definition at line 81 of file BDOpenClosed.h.
References BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
Referenced by BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().
|
inline |
|
inline |
void BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::verifyData | ( | ) |
|
private |
Definition at line 129 of file BDOpenClosed.h.
Referenced by BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookat(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookup(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::size(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().
|
private |
Definition at line 122 of file BDOpenClosed.h.
Referenced by BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::GetOpenItem(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenReadySize(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenSize(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenWaitingSize(), BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().
|
private |
Definition at line 127 of file BDOpenClosed.h.