Skip to content

num::structures::dijkstra

Defined in header <structures/algorithms/traversal.hpp>

template <typename Weight, std::integral Index, std::integral Source = Index>
array<Weight> dijkstra(const graph<Weight, Index> &G, Source source_in);

Compute single-source shortest path distances using Dijkstra with an Indexed Priority Queue.