KrisLibrary  1.0.0
Public Types | List of all members
AI::AStar< S > Struct Template Reference

#include <GeneralizedAStar.h>

Inheritance diagram for AI::AStar< S >:
AI::GeneralizedAStar< S, double >

Public Types

typedef struct GeneralizedAStar< S, double >::Node Node
 

Additional Inherited Members

- Public Member Functions inherited from AI::GeneralizedAStar< S, double >
 GeneralizedAStar (const S &start)
 
void SetStart (const S &start)
 Resets the search from the given start state.
 
bool Search ()
 Performs search until a goal is reached.
 
bool SearchStep ()
 Performs a single iteration of search.
 
bool SearchFailed ()
 Returns true if search failed.
 
int NumNodes () const
 Returns the number of nodes in the tree.
 
int NumExpanded () const
 Returns the number of previously expanded nodes.
 
int NumDescendents (const Node &n) const
 Returns the number of descendents of n.
 
double TopPriority () const
 Returns the priority of the next node to be expanded.
 
bool GoalFound () const
 Returns true if the goal has been found.
 
double GoalCost () const
 
const std::vector< S > & GoalPath () const
 Returns path of states to the goal.
 
virtual bool IsGoal (const S &s)=0
 The following must be overloaded by the subclass.
 
virtual void Successors (const S &s, std::vector< S > &successors, std::vector< double > &costs)=0
 
virtual double Heuristic (const S &s)
 
virtual void ClearVisited ()
 
virtual void Visit (const S &s, Node *n)
 
virtual NodeVisitedStateNode (const S &s)
 
virtual bool OnExpand (Node *n)
 
- Public Attributes inherited from AI::GeneralizedAStar< S, double >
bool testGoalOnGeneration
 
double zero
 
Node root
 The A* search tree.
 
IndexedPriorityQueue< Node *, std::pair< double, double > > fringe
 
std::vector< S > successors
 Temporary variables – slightly reduces the number of memory allocations.
 
std::vector< double > costs
 
int numNodes
 
Nodegoal
 Upon successful termination, goal contains the goal node.
 
std::vector< S > path
 Upon successful termination, path contains the path from start to goal.
 

Detailed Description

template<class S>
struct AI::AStar< S >

Defines standard AStar as a GeneralizedAStar instance with double-valued costs.


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