HOG2
|
#include <IndexOpenClosed.h>
Public Member Functions | |
IndexOpenClosed () | |
~IndexOpenClosed () | |
void | Reset (int maxID) |
Remove all objects from queue. More... | |
uint64_t | AddOpenNode (const state &val, uint64_t hash, double g, double h, uint64_t parent=kTAStarNoNode) |
Add object into open list. More... | |
uint64_t | AddOpenNode (const state &val, uint64_t hash, double f, double g, double h, uint64_t parent=kTAStarNoNode) |
uint64_t | AddClosedNode (state &val, uint64_t hash, double g, double h, uint64_t parent=kTAStarNoNode) |
Add object into closed list. More... | |
uint64_t | AddClosedNode (state &val, uint64_t hash, double f, double g, double h, uint64_t parent=kTAStarNoNode) |
Add object into closed list. More... | |
void | KeyChanged (uint64_t objKey) |
Indicate that the key for a particular object has changed. More... | |
dataLocation | Lookup (uint64_t hashKey, uint64_t &objKey) const |
Returns location of object as well as object key. More... | |
dataStructure & | Lookup (uint64_t objKey) |
const dataStructure & | Lookat (uint64_t objKey) const |
uint64_t | GetRound () const |
uint64_t | Peek () 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... | |
void | Reopen (uint64_t objKey) |
Move item off the closed list and back onto the open list. More... | |
uint64_t | GetOpenItem (unsigned int which) const |
size_t | OpenSize () const |
size_t | ClosedSize () const |
size_t | size () const |
Private Member Functions | |
bool | HeapifyUp (unsigned int index) |
Moves a node up the heap. More... | |
void | HeapifyDown (unsigned int index) |
Private Attributes | |
uint64_t | currentRound |
std::vector< uint64_t > | theHeap |
std::vector< dataStructure > | elements |
Definition at line 80 of file IndexOpenClosed.h.
IndexOpenClosed< state, CmpKey, dataStructure >::IndexOpenClosed |
Definition at line 115 of file IndexOpenClosed.h.
IndexOpenClosed< state, CmpKey, dataStructure >::~IndexOpenClosed |
Definition at line 124 of file IndexOpenClosed.h.
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::AddClosedNode | ( | state & | val, |
uint64_t | hash, | ||
double | f, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTAStarNoNode |
||
) |
Add object into closed list.
Definition at line 200 of file IndexOpenClosed.h.
References kClosedList, and kTAStarNoNode.
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::AddClosedNode | ( | state & | val, |
uint64_t | hash, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTAStarNoNode |
||
) |
Add object into closed list.
Definition at line 185 of file IndexOpenClosed.h.
References kClosedList, and kTAStarNoNode.
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::AddOpenNode | ( | const state & | val, |
uint64_t | hash, | ||
double | f, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTAStarNoNode |
||
) |
Definition at line 165 of file IndexOpenClosed.h.
References kOpenList, and kTAStarNoNode.
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::AddOpenNode | ( | const state & | val, |
uint64_t | hash, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTAStarNoNode |
||
) |
Add object into open list.
Definition at line 148 of file IndexOpenClosed.h.
References kOpenList, and kTAStarNoNode.
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::Close |
Move the best item to the closed list and return key.
Definition at line 249 of file IndexOpenClosed.h.
References kClosedList.
|
inline |
Definition at line 101 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::OpenSize(), and IndexOpenClosed< state, CmpKey, dataStructure >::size().
|
inline |
Definition at line 99 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::theHeap.
|
inline |
Definition at line 94 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::currentRound.
|
private |
Definition at line 302 of file IndexOpenClosed.h.
|
private |
Moves a node up the heap.
Returns true if the node was moved, false otherwise.
Definition at line 282 of file IndexOpenClosed.h.
void IndexOpenClosed< state, CmpKey, dataStructure >::KeyChanged | ( | uint64_t | objKey | ) |
Indicate that the key for a particular object has changed.
Definition at line 215 of file IndexOpenClosed.h.
|
inline |
Definition at line 93 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::elements.
dataLocation IndexOpenClosed< state, CmpKey, dataStructure >::Lookup | ( | uint64_t | hashKey, |
uint64_t & | objKey | ||
) | const |
Returns location of object as well as object key.
Definition at line 225 of file IndexOpenClosed.h.
References kNotFound.
|
inline |
Definition at line 92 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::elements.
|
inline |
Definition at line 100 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::theHeap.
Referenced by IndexOpenClosed< state, CmpKey, dataStructure >::ClosedSize().
uint64_t IndexOpenClosed< state, CmpKey, dataStructure >::Peek |
Peek at the next item to be expanded.
Definition at line 238 of file IndexOpenClosed.h.
void IndexOpenClosed< state, CmpKey, dataStructure >::Reopen | ( | uint64_t | objKey | ) |
Move item off the closed list and back onto the open list.
Definition at line 267 of file IndexOpenClosed.h.
References kClosedList, and kOpenList.
void IndexOpenClosed< state, CmpKey, dataStructure >::Reset | ( | int | maxID | ) |
Remove all objects from queue.
Definition at line 132 of file IndexOpenClosed.h.
|
inline |
Definition at line 102 of file IndexOpenClosed.h.
References IndexOpenClosed< state, CmpKey, dataStructure >::elements.
Referenced by IndexOpenClosed< state, CmpKey, dataStructure >::ClosedSize().
|
private |
Definition at line 108 of file IndexOpenClosed.h.
Referenced by IndexOpenClosed< state, CmpKey, dataStructure >::GetRound().
|
private |
Definition at line 110 of file IndexOpenClosed.h.
Referenced by IndexOpenClosed< state, CmpKey, dataStructure >::Lookat(), IndexOpenClosed< state, CmpKey, dataStructure >::Lookup(), and IndexOpenClosed< state, CmpKey, dataStructure >::size().
|
private |
Definition at line 109 of file IndexOpenClosed.h.
Referenced by IndexOpenClosed< state, CmpKey, dataStructure >::GetOpenItem(), and IndexOpenClosed< state, CmpKey, dataStructure >::OpenSize().