#include <nodelist.hpp>
Public Types | |
typedef Titem_ | Titem |
make Titem_ visible from outside of class | |
typedef Titem_::Key | Key |
make Titem_::Key a property of HashTable | |
typedef CArrayT< Titem_, 65536, 256 > | CItemArray |
type that we will use as item container | |
typedef CHashTableT< Titem_, Thash_bits_open_ > | COpenList |
how pointers to open nodes will be stored | |
typedef CHashTableT< Titem_, Thash_bits_closed_ > | CClosedList |
how pointers to closed nodes will be stored | |
typedef CBinaryHeapT< Titem_ > | CPriorityQueue |
how the priority queue will be managed | |
Public Member Functions | |
CNodeList_HashTableT () | |
default constructor | |
~CNodeList_HashTableT () | |
destructor | |
FORCEINLINE int | OpenCount () |
return number of open nodes | |
FORCEINLINE int | ClosedCount () |
return number of closed nodes | |
FORCEINLINE Titem_ * | CreateNewNode () |
allocate new data item from m_arr | |
FORCEINLINE void | FoundBestNode (Titem_ &item) |
notify the nodelist, that we don't want to discard the given node | |
FORCEINLINE void | InsertOpenNode (Titem_ &item) |
insert given item as open node (into m_open and m_open_queue) | |
FORCEINLINE Titem_ * | GetBestOpenNode () |
return the best open node | |
FORCEINLINE Titem_ * | PopBestOpenNode () |
remove and return the best open node | |
FORCEINLINE Titem_ * | FindOpenNode (const Key &key) |
return the open node specified by a key or NULL if not found | |
FORCEINLINE Titem_ & | PopOpenNode (const Key &key) |
remove and return the open node specified by a key | |
FORCEINLINE void | InsertClosedNode (Titem_ &item) |
close node | |
FORCEINLINE Titem_ * | FindClosedNode (const Key &key) |
return the closed node specified by a key or NULL if not found | |
FORCEINLINE int | TotalCount () |
FORCEINLINE Titem_ & | ItemAt (int idx) |
template<class D> | |
void | Dump (D &dmp) const |
Protected Attributes | |
CItemArray | m_arr |
here we store full item data (Titem_) | |
COpenList | m_open |
hash table of pointers to open item data | |
CClosedList | m_closed |
hash table of pointers to closed item data | |
CPriorityQueue | m_open_queue |
priority queue of pointers to open item data | |
Titem * | m_new_node |
new open node under construction |
Implements open list, closed list and priority queue for A-star path finder.
Definition at line 16 of file nodelist.hpp.