HOG2
|
#include <BucketOpenClosed.h>
Classes | |
struct | qData |
Public Member Functions | |
BucketOpenClosed () | |
~BucketOpenClosed () | |
void | Reset () |
Remove all objects from queue. More... | |
uint64_t | AddOpenNode (const state &val, uint64_t hash, double f, double g, double h, uint64_t parent=kTAStarNoNode) |
Add object into open 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 | 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) |
size_t | OpenSize () const |
size_t | ClosedSize () const |
size_t | size () const |
void | Print () |
Private Types | |
typedef std::unordered_map< uint64_t, uint64_t, AHash64 > | IndexTable |
Private Member Functions | |
void | FindNewMin () |
uint64_t | Add (uint64_t key, uint64_t fCost) |
void | Remove (uint64_t key, uint64_t fCost) |
Private Attributes | |
int | openCount |
int | minBucket |
int | minSubBucket |
std::vector< qData > | pQueue |
IndexTable | table |
std::vector< dataStructure > | elements |
Definition at line 16 of file BucketOpenClosed.h.
|
private |
Definition at line 51 of file BucketOpenClosed.h.
BucketOpenClosed< state, CmpKey, dataStructure >::BucketOpenClosed |
Definition at line 57 of file BucketOpenClosed.h.
BucketOpenClosed< state, CmpKey, dataStructure >::~BucketOpenClosed |
Definition at line 64 of file BucketOpenClosed.h.
|
private |
Definition at line 310 of file BucketOpenClosed.h.
uint64_t BucketOpenClosed< 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 126 of file BucketOpenClosed.h.
References kClosedList, and kTAStarNoNode.
uint64_t BucketOpenClosed< state, CmpKey, dataStructure >::AddOpenNode | ( | const state & | val, |
uint64_t | hash, | ||
double | f, | ||
double | g, | ||
double | h, | ||
uint64_t | parent = kTAStarNoNode |
||
) |
Add object into open list.
Definition at line 101 of file BucketOpenClosed.h.
References kOpenList, and kTAStarNoNode.
uint64_t BucketOpenClosed< state, CmpKey, dataStructure >::Close |
Move the best item to the closed list and return key.
Definition at line 208 of file BucketOpenClosed.h.
References kClosedList.
|
inline |
Definition at line 34 of file BucketOpenClosed.h.
References BucketOpenClosed< state, CmpKey, dataStructure >::OpenSize(), and BucketOpenClosed< state, CmpKey, dataStructure >::size().
|
private |
Definition at line 242 of file BucketOpenClosed.h.
uint64_t BucketOpenClosed< state, CmpKey, dataStructure >::GetOpenItem | ( | unsigned int | which | ) |
Definition at line 274 of file BucketOpenClosed.h.
References kOpenList.
void BucketOpenClosed< state, CmpKey, dataStructure >::KeyChanged | ( | uint64_t | objKey | ) |
Indicate that the key for a particular object has changed.
Definition at line 141 of file BucketOpenClosed.h.
|
inline |
Definition at line 27 of file BucketOpenClosed.h.
References BucketOpenClosed< state, CmpKey, dataStructure >::elements.
dataLocation BucketOpenClosed< state, CmpKey, dataStructure >::Lookup | ( | uint64_t | hashKey, |
uint64_t & | objKey | ||
) | const |
Returns location of object as well as object key.
Definition at line 176 of file BucketOpenClosed.h.
References kNotFound.
|
inline |
Definition at line 26 of file BucketOpenClosed.h.
References BucketOpenClosed< state, CmpKey, dataStructure >::elements.
|
inline |
Definition at line 33 of file BucketOpenClosed.h.
References BucketOpenClosed< state, CmpKey, dataStructure >::openCount.
Referenced by BucketOpenClosed< state, CmpKey, dataStructure >::ClosedSize().
uint64_t BucketOpenClosed< state, CmpKey, dataStructure >::Peek |
Peek at the next item to be expanded.
Definition at line 193 of file BucketOpenClosed.h.
void BucketOpenClosed< state, CmpKey, dataStructure >::Print |
Definition at line 290 of file BucketOpenClosed.h.
|
private |
Definition at line 335 of file BucketOpenClosed.h.
void BucketOpenClosed< state, CmpKey, dataStructure >::Reopen | ( | uint64_t | objKey | ) |
Move item off the closed list and back onto the open list.
Definition at line 229 of file BucketOpenClosed.h.
References kClosedList, and kOpenList.
void BucketOpenClosed< state, CmpKey, dataStructure >::Reset |
Remove all objects from queue.
Definition at line 72 of file BucketOpenClosed.h.
|
inline |
Definition at line 35 of file BucketOpenClosed.h.
References BucketOpenClosed< state, CmpKey, dataStructure >::elements.
Referenced by BucketOpenClosed< state, CmpKey, dataStructure >::ClosedSize().
|
private |
Definition at line 53 of file BucketOpenClosed.h.
Referenced by BucketOpenClosed< state, CmpKey, dataStructure >::Lookat(), BucketOpenClosed< state, CmpKey, dataStructure >::Lookup(), and BucketOpenClosed< state, CmpKey, dataStructure >::size().
|
private |
Definition at line 43 of file BucketOpenClosed.h.
|
private |
Definition at line 43 of file BucketOpenClosed.h.
|
private |
Definition at line 42 of file BucketOpenClosed.h.
Referenced by BucketOpenClosed< state, CmpKey, dataStructure >::OpenSize().
|
private |
Definition at line 49 of file BucketOpenClosed.h.
|
private |
Definition at line 52 of file BucketOpenClosed.h.