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 shortest path lengths by Dijkstra's algorithm: \(d(s, v) = \min_{\text{paths } s \to v} \sum w_e\).