Symphony Of Empires
pathfind.hpp File Reference
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <cmath>
Include dependency graph for pathfind.hpp:

Go to the source code of this file.

Namespaces

 Eng3D
 
 Eng3D::Pathfind
 

Functions

template<typename T >
std::vector< T > Eng3D::Pathfind::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 Eng3D::Pathfind::from_source (T source, const std::vector< std::vector< V >> &neighbour_rels, std::vector< float > &costs)