Fawkes API
Fawkes Development Version
|
This is the abstract(!) class for an A* State. More...
#include <>>
Public Member Functions | |
AStarState (float cost_sofar, AStarState *parent) | |
Constructor. More... | |
virtual | ~AStarState () |
Destructor. More... | |
virtual size_t | key ()=0 |
Generates a unique key for this state. More... | |
virtual float | estimate ()=0 |
Estimate the heuristic cost to the goal. More... | |
virtual bool | is_goal ()=0 |
Check, wether we reached a goal or not. More... | |
virtual std::vector< AStarState * > | children ()=0 |
Generate all successors and put them to this vector. More... | |
AStarState () | |
This is the standard constructor. More... | |
AStarState (int x, int y, int past_cost, AStarState *father) | |
This is another standard constuctor, this time parametrized. More... | |
Public Attributes | |
AStarState * | parent |
Predecessor. More... | |
float | path_cost |
Cost of path leading to this search state. More... | |
float | total_estimated_cost |
Total estimated cost. More... | |
int | x_ |
x coordinate of the state More... | |
int | y_ |
y coordinate of the state More... | |
AStarState * | father_ |
The predecessor state. More... | |
int | past_cost_ |
The past cost. More... | |
int | total_cost_ |
The total cost. More... | |
This is the abstract(!) class for an A* State.
This is the class for an A* State.
Definition at line 38 of file astar_state.h.
|
inline |
Constructor.
cost_sofar | costs for the path so far |
parent | parent search state (maybe NULL for first state) |
Definition at line 46 of file astar_state.h.
|
inlinevirtual |
Destructor.
Standard Destructor.
Definition at line 51 of file astar_state.h.
References children(), estimate(), is_goal(), and key().
Referenced by AStarState().
|
inline |
This is the standard constructor.
Definition at line 58 of file astar_state.h.
References father_, past_cost_, total_cost_, x_, and y_.
|
inline |
This is another standard constuctor, this time parametrized.
x | is the x coordinate. |
y | is the y coordinate. |
past_cost | is the total left cost. |
father | is a pointer to the predecessor of this AStarState. |
Definition at line 73 of file astar_state.h.
References father_, past_cost_, x_, y_, and ~AStarState().
|
pure virtual |
Generate all successors and put them to this vector.
Referenced by fawkes::AStar::solve(), and ~AStarState().
|
pure virtual |
Estimate the heuristic cost to the goal.
Implemented in fawkes::NavGraphSearchState.
Referenced by ~AStarState().
|
pure virtual |
Check, wether we reached a goal or not.
Implemented in fawkes::NavGraphSearchState.
Referenced by fawkes::AStar::solve(), and ~AStarState().
|
pure virtual |
Generates a unique key for this state.
There has to be a unique key for each state (fast closed list -> bottleneck!)
Implemented in fawkes::NavGraphSearchState.
Referenced by fawkes::AStar::solve(), and ~AStarState().
AStarState* fawkes::AStarState::father_ |
The predecessor state.
Definition at line 45 of file astar_state.h.
Referenced by AStarState(), and fawkes::AStar::solve().
AStarState* fawkes::AStarState::parent |
int fawkes::AStarState::past_cost_ |
The past cost.
Definition at line 47 of file astar_state.h.
Referenced by AStarState(), and fawkes::AStar::solve().
float fawkes::AStarState::path_cost |
Cost of path leading to this search state.
Definition at line 82 of file astar_state.h.
Referenced by fawkes::NavGraphSearchState::is_goal(), and fawkes::NavGraphSearchState::NavGraphSearchState().
int fawkes::AStarState::total_cost_ |
The total cost.
Definition at line 48 of file astar_state.h.
Referenced by AStarState(), fawkes::AStar::remove_target_from_obstacle(), and fawkes::AStar::solve().
float fawkes::AStarState::total_estimated_cost |
Total estimated cost.
Definition at line 85 of file astar_state.h.
Referenced by fawkes::NavGraphSearchState::NavGraphSearchState().
int fawkes::AStarState::x_ |
x coordinate of the state
Definition at line 42 of file astar_state.h.
Referenced by AStarState(), fawkes::AStar::remove_target_from_obstacle(), and fawkes::AStar::solve().
int fawkes::AStarState::y_ |
y coordinate of the state
Definition at line 43 of file astar_state.h.
Referenced by AStarState(), fawkes::AStar::remove_target_from_obstacle(), and fawkes::AStar::solve().