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

Public Types

typedef pair< int, SubsetState
 
typedef GeneralizedAStar< State, SubsetCost >::Node Node
 

Public Member Functions

 OptimalSubsetAStar2 (MCRPlannerGoalSet *_planner, int _start, const vector< int > &_targets)
 
virtual bool IsGoal (const State &s)
 The following must be overloaded by the subclass.
 
virtual void Successors (const State &s, vector< State > &successors, vector< SubsetCost > &cost)
 
virtual void ClearVisited ()
 
virtual void Visit (const State &s, Node *n)
 
virtual NodeVisitedStateNode (const State &s)
 
- Public Member Functions inherited from AI::GeneralizedAStar< pair< int, Subset >, SubsetCost >
 GeneralizedAStar (const pair< int, Subset > &start)
 
void SetStart (const pair< int, Subset > &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< pair< int, Subset > > & GoalPath () const
 Returns path of states to the goal.
 
virtual SubsetCost Heuristic (const pair< int, Subset > &s)
 
virtual void Visit (const pair< int, Subset > &s, Node *n)
 
virtual bool OnExpand (Node *n)
 

Public Attributes

MCRPlannerGoalSetplanner
 
int startNode
 
set< int > targetNodes
 
vector< vector< pair< Subset, Node * > > > visited
 
- Public Attributes inherited from AI::GeneralizedAStar< pair< int, Subset >, SubsetCost >
bool testGoalOnGeneration
 
SubsetCost zero
 
Node root
 The A* search tree.
 
IndexedPriorityQueue< Node *, std::pair< SubsetCost, SubsetCost > > fringe
 
std::vector< pair< int, Subset > > 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< pair< int, Subset > > path
 Upon successful termination, path contains the path from start to goal.
 

Member Function Documentation

virtual void OptimalSubsetAStar2::ClearVisited ( )
inlinevirtual

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

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


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