Pol  Revision:cb584c9
Pol::Plib::AStarSearch< UserState > Class Template Reference

#include <stlastar.h>

Classes

class  HeapCompare_f
 
class  Node
 

Public Types

enum  {
  SEARCH_STATE_NOT_INITIALISED, SEARCH_STATE_SEARCHING, SEARCH_STATE_SUCCEEDED, SEARCH_STATE_FAILED,
  SEARCH_STATE_OUT_OF_MEMORY, SEARCH_STATE_INVALID, SEARCH_STATE_SOLUTION_CORRUPTED
}
 
typedef std::vector< Node * > NodeVector
 
typedef NodeVector::iterator NodeVectorIterator
 

Public Member Functions

 AStarSearch (int MaxNodes=1000)
 
bool AddSuccessor (UserState &State)
 
bool AddToSolutionList (Node *theNode)
 
void CancelSearch ()
 
void FreeSolutionNodes ()
 
UserState * GetClosedListNext ()
 
UserState * GetClosedListNext (float &f, float &g, float &h)
 
UserState * GetClosedListStart ()
 
UserState * GetClosedListStart (float &f, float &g, float &h)
 
UserState * GetOpenListNext ()
 
UserState * GetOpenListNext (float &f, float &g, float &h)
 
UserState * GetOpenListStart ()
 
UserState * GetOpenListStart (float &f, float &g, float &h)
 
UserState * GetSolutionEnd ()
 
UserState * GetSolutionNext ()
 
UserState * GetSolutionPrev ()
 
UserState * GetSolutionStart ()
 
int GetStepCount ()
 
bool InClosedList (UserState &theState)
 
bool InOpenList (UserState &theState)
 
unsigned int SearchStep (bool doors_block)
 
void SetStartAndGoalStates (UserState &Start, UserState &Goal)
 

Private Member Functions

NodeAllocateNode ()
 
void FreeAllNodes ()
 
void FreeNode (Node *node)
 
void FreeUnusedNodes ()
 

Private Attributes

NodeVectorIterator iterDbgClosed
 
NodeVectorIterator iterDbgOpen
 
int m_AllocateNodeCount
 
bool m_CancelRequest
 
NodeVector m_ClosedList
 
Nodem_CurrentSolutionNode
 
Pol::Plib::FixedSizeAllocator< Nodem_FixedSizeAllocator
 
int m_FreeNodeCount
 
Nodem_Goal
 
NodeVector m_OpenList
 
NodeVector m_SolutionList
 
Nodem_Start
 
unsigned int m_State
 
int m_Steps
 
NodeVector m_Successors
 

Detailed Description

template<class UserState>
class Pol::Plib::AStarSearch< UserState >

Definition at line 39 of file stlastar.h.

Member Typedef Documentation

template<class UserState>
typedef std::vector<Node*> Pol::Plib::AStarSearch< UserState >::NodeVector

Definition at line 72 of file stlastar.h.

template<class UserState>
typedef NodeVector::iterator Pol::Plib::AStarSearch< UserState >::NodeVectorIterator

Definition at line 73 of file stlastar.h.

Member Enumeration Documentation

template<class UserState>
anonymous enum
Enumerator
SEARCH_STATE_NOT_INITIALISED 
SEARCH_STATE_SEARCHING 
SEARCH_STATE_SUCCEEDED 
SEARCH_STATE_FAILED 
SEARCH_STATE_OUT_OF_MEMORY 
SEARCH_STATE_INVALID 
SEARCH_STATE_SOLUTION_CORRUPTED 

Definition at line 42 of file stlastar.h.

Constructor & Destructor Documentation

template<class UserState>
Pol::Plib::AStarSearch< UserState >::AStarSearch ( int  MaxNodes = 1000)
inline

Definition at line 85 of file stlastar.h.

Member Function Documentation

template<class UserState>
bool Pol::Plib::AStarSearch< UserState >::AddSuccessor ( UserState &  State)
inline
template<class UserState>
bool Pol::Plib::AStarSearch< UserState >::AddToSolutionList ( Node theNode)
inline
template<class UserState>
void Pol::Plib::AStarSearch< UserState >::CancelSearch ( )
inline

Definition at line 99 of file stlastar.h.

References Pol::Plib::AStarSearch< UserState >::m_CancelRequest.

template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetClosedListNext ( )
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetClosedListNext ( float &  f,
float &  g,
float &  h 
)
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetClosedListStart ( )
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetClosedListStart ( float &  f,
float &  g,
float &  h 
)
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetOpenListNext ( )
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetOpenListNext ( float &  f,
float &  g,
float &  h 
)
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetOpenListStart ( )
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetOpenListStart ( float &  f,
float &  g,
float &  h 
)
inline
template<class UserState>
UserState* Pol::Plib::AStarSearch< UserState >::GetSolutionPrev ( )
inline
template<class UserState>
int Pol::Plib::AStarSearch< UserState >::GetStepCount ( )
inline

Definition at line 584 of file stlastar.h.

References Pol::Plib::AStarSearch< UserState >::m_Steps.

template<class UserState>
bool Pol::Plib::AStarSearch< UserState >::InClosedList ( UserState &  theState)
inline
template<class UserState>
bool Pol::Plib::AStarSearch< UserState >::InOpenList ( UserState &  theState)
inline

Definition at line 132 of file stlastar.h.

References Pol::Plib::AStarSearch< UserState >::m_OpenList.

Member Data Documentation

template<class UserState>
NodeVectorIterator Pol::Plib::AStarSearch< UserState >::iterDbgClosed
private
template<class UserState>
NodeVectorIterator Pol::Plib::AStarSearch< UserState >::iterDbgOpen
private
template<class UserState>
int Pol::Plib::AStarSearch< UserState >::m_AllocateNodeCount
private

Definition at line 721 of file stlastar.h.

Referenced by Pol::Plib::AStarSearch< UserState >::AllocateNode().

template<class UserState>
Pol::Plib::FixedSizeAllocator<Node> Pol::Plib::AStarSearch< UserState >::m_FixedSizeAllocator
private
template<class UserState>
int Pol::Plib::AStarSearch< UserState >::m_FreeNodeCount
private

Definition at line 722 of file stlastar.h.

Referenced by Pol::Plib::AStarSearch< UserState >::FreeNode().

template<class UserState>
NodeVector Pol::Plib::AStarSearch< UserState >::m_SolutionList
private

Definition at line 694 of file stlastar.h.

Referenced by Pol::Plib::AStarSearch< UserState >::AddToSolutionList().

template<class UserState>
unsigned int Pol::Plib::AStarSearch< UserState >::m_State
private
template<class UserState>
NodeVector Pol::Plib::AStarSearch< UserState >::m_Successors
private

The documentation for this class was generated from the following file: