Symphony Of Empires
|
Functions | |
template<typename T > | |
std::vector< T > | get_path (T start, T end, std::function< std::vector< T >(T)> g, std::function< float(T, T)> h) |
Implements the A* algorithm with euclidean distance as heuristic. Returns a vector where the starting point is at the back and the end point at the front. More... | |
template<typename T , typename V > | |
void | from_source (T source, const std::vector< std::vector< V >> &neighbour_rels, std::vector< float > &costs) |
|
inline |
Definition at line 97 of file pathfind.hpp.
|
inline |
Implements the A* algorithm with euclidean distance as heuristic. Returns a vector where the starting point is at the back and the end point at the front.
g | The predicate generator returning a iterable container with the neioghbour of the given arguments |
h | Heuristic function (cost + HeurFn()) |
Keeps track of the costs so far
Keeps track of the previous tile for each tile
Keeps track of which tiles have been visited
Priority queue based on cost
Definition at line 40 of file pathfind.hpp.