Pathfinder
Astar.h
Go to the documentation of this file.
1 
10 #ifndef ASTAR_H
11 #define ASTAR_H
12 
13 #include <boost/optional.hpp>
14 
15 #include "Using.h"
16 
17 namespace Pathfinder {
18 
36  boost::optional<Vertex>
38  const Graph* graph,
39  const Vertex& v,
40  const Vertex& goal,
41  const short& agent,
42  const std::vector<Vertex>& considered
43  );
44 
45 
55  float
56  cost(
57  const Graph* graph,
58  const Vertex& ni,
59  const Vertex& nj
60  );
61 
62 
76  std::vector<Vertex>
77  astar(
78  const Graph* graph,
79  const Vertex& start,
80  const Vertex& goal,
81  const short& agent
82  );
83 
84 }
85 
86 #endif
boost::optional< Vertex > nextSuccessor(const Graph *graph, const Vertex &v, const Vertex &goal, const short &agent, const std::vector< Vertex > &considered)
This function yields the next vertex that shall be processed by A*.
Definition: Astar.cpp:24
std::vector< Vertex > astar(const Graph *graph, const Vertex &start, const Vertex &goal, const short &agent)
Find a path from start to goal using A*.
Definition: Astar.cpp:79
Definition: AABB.cpp:21
boost::graph_traits< Graph >::vertex_descriptor Vertex
Shorthand notation for the graph vertices.
Definition: Using.h:48
boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, GraphVertex, GraphEdge > Graph
Shorthand notation for the graph used.
Definition: Using.h:42
float cost(const Graph *graph, const Vertex &ni, const Vertex &nj)
Return the edge weight of the edge {ni, nj} in graph.
Definition: Astar.cpp:66
This file provides using and enum declarations.