HOG2
|
#include <BDIndexOpenClosed.h>
Public Member Functions | |
BDIndexOpenClosed () | |
void | Reset (int max) |
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::vector< dataStructure > | elements |
uint32_t | currRound |
Definition at line 38 of file BDIndexOpenClosed.h.
BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::BDIndexOpenClosed |
Definition at line 134 of file BDIndexOpenClosed.h.
uint64_t BDIndexOpenClosed< 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 194 of file BDIndexOpenClosed.h.
References kClosed, and kTBDNoNode.
uint64_t BDIndexOpenClosed< 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 163 of file BDIndexOpenClosed.h.
References kOpenReady, kOpenWaiting, and kTBDNoNode.
uint64_t BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Close |
Move the best item to the closed list and return key.
Definition at line 311 of file BDIndexOpenClosed.h.
References kClosed, and kOpenReady.
|
inline |
|
inline |
Definition at line 64 of file BDIndexOpenClosed.h.
References BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
|
private |
Definition at line 399 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
private |
Moves a node up the heap.
Returns true if the node was moved, false otherwise.
Definition at line 360 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
void BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::KeyChanged | ( | uint64_t | objKey | ) |
Indicate that the key for a particular object has changed.
Definition at line 210 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
inline |
Definition at line 49 of file BDIndexOpenClosed.h.
References BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
stateLocation BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookup | ( | uint64_t | hashKey, |
uint64_t & | objKey | ||
) | const |
**
Returns location of object as well as object key.
Definition at line 262 of file BDIndexOpenClosed.h.
References kUnseen.
|
inline |
Definition at line 48 of file BDIndexOpenClosed.h.
References BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
|
inline |
Definition at line 65 of file BDIndexOpenClosed.h.
References kOpenReady, and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
Referenced by BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize().
|
inline |
Definition at line 67 of file BDIndexOpenClosed.h.
References kOpenReady, kOpenWaiting, and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
|
inline |
Definition at line 66 of file BDIndexOpenClosed.h.
References kOpenWaiting, and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::priorityQueues.
Referenced by BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize().
uint64_t BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Peek | ( | stateLocation | whichQueue | ) | const |
Peek at the next item to be expanded.
Definition at line 275 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
|
inline |
Peek at the next item to be expanded.
Definition at line 292 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
uint64_t BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::PutToReady |
Definition at line 327 of file BDIndexOpenClosed.h.
References kOpenReady, and kOpenWaiting.
void BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Remove | ( | uint64_t | objKey | ) |
Definition at line 229 of file BDIndexOpenClosed.h.
References kClosed.
void BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Reset | ( | int | max | ) |
Remove all objects from queue.
Definition at line 149 of file BDIndexOpenClosed.h.
|
inline |
Definition at line 70 of file BDIndexOpenClosed.h.
References BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::elements.
Referenced by BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ClosedSize(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().
|
inline |
|
inline |
void BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::verifyData | ( | ) |
|
private |
Definition at line 113 of file BDIndexOpenClosed.h.
|
private |
Definition at line 112 of file BDIndexOpenClosed.h.
Referenced by BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookat(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::Lookup(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::size(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().
|
private |
Definition at line 111 of file BDIndexOpenClosed.h.
Referenced by BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::GetOpenItem(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenReadySize(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenSize(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::OpenWaitingSize(), BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenReady(), and BDIndexOpenClosed< state, CmpKey0, CmpKey1, dataStructure >::ValidateOpenWaiting().