libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
GraphState.hpp
1 #ifndef GRAPHSTATE_HPP
2 #define GRAPHSTATE_HPP
3 
4 #include "API/Search/AStar/State.hpp"
5 #include "Planner-pkg.h"
17 class GraphState : public API::State
18 {
19 public:
20  GraphState();
21  GraphState(p3d_node* n);
22 
23  std::vector<State*> getSuccessors();
24 
25  p3d_node* getGraphNode() { return _GraphNode; }
26 
27  bool equal(State* other);
28  bool isLeaf();
29  void print();
30 
31  void setClosed(std::vector<State*>& closedStates,std::vector<State*>& openStates);
32  bool isColsed(std::vector<State*>& closedStates);
33 
34  void setOpen(std::vector<State*>& openStates);
35  bool isOpen(std::vector<State*>& openStates);
36 
37 protected:
38  double computeLength(API::State *parent); /* g */
39  double computeHeuristic(API::State *parent); /* h */
40 
41 private:
42  p3d_node* _GraphNode;
43 };
44 
45 #endif // GRAPHSTATE_HPP
Graph state interface for the AStar class.
Definition: GraphState.hpp:17
++
Definition: State.hpp:20