KrisLibrary  1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
GreedySubsetAStar2 Struct Reference
Inheritance diagram for GreedySubsetAStar2:
AI::GeneralizedAStar< int, SubsetCost >

Public Types

typedef GeneralizedAStar< int, SubsetCost >::Node Node
 

Public Member Functions

 GreedySubsetAStar2 (MCRPlannerGoalSet *_planner, int _start, const vector< int > _targets)
 
virtual bool IsGoal (const int &s)
 The following must be overloaded by the subclass.
 
virtual void Successors (const int &s, vector< int > &successors, vector< SubsetCost > &cost)
 
virtual void ClearVisited ()
 
virtual void Visit (const int &s, Node *n)
 
virtual Node * VisitedStateNode (const int &s)
 
- Public Member Functions inherited from AI::GeneralizedAStar< int, SubsetCost >
 GeneralizedAStar (const int &start)
 
void SetStart (const int &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.
 
SubsetCost TopPriority () const
 Returns the priority of the next node to be expanded.
 
bool GoalFound () const
 Returns true if the goal has been found.
 
SubsetCost GoalCost () const
 
const std::vector< int > & GoalPath () const
 Returns path of states to the goal.
 
virtual SubsetCost Heuristic (const int &s)
 
virtual void Visit (const int &s, Node *n)
 
virtual bool OnExpand (Node *n)
 

Public Attributes

MCRPlannerGoalSetplanner
 
int startNode
 
set< int > targetNodes
 
vector< Node * > visited
 
- Public Attributes inherited from AI::GeneralizedAStar< int, SubsetCost >
bool testGoalOnGeneration
 
SubsetCost zero
 
Node root
 The A* search tree.
 
IndexedPriorityQueue< Node *, std::pair< SubsetCost, SubsetCost > > fringe
 
std::vector< int > successors
 Temporary variables – slightly reduces the number of memory allocations.
 
std::vector< SubsetCostcosts
 
int numNodes
 
Nodegoal
 Upon successful termination, goal contains the goal node.
 
std::vector< int > path
 Upon successful termination, path contains the path from start to goal.
 

Member Function Documentation

virtual void GreedySubsetAStar2::ClearVisited ( )
inlinevirtual

Optionally, overload these functions. If not overloaded, does no visited test

Reimplemented from AI::GeneralizedAStar< int, SubsetCost >.


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