bsdrks/graaf

Feature: add SSSP for types that implement `CountAllVertices` and `DijkstraUnweighted`

Closed this issue · 0 comments

Single-source short-path for an unweighted graph is equivalent to DijkstraUnweighted.dijkstra called with:

  • dist = vec![usize::MAX, graph.count_all_vertices()]; dist[s] = 0;
  • heap = BinaryHeap::from([(Reverse(0), s)]);
  • step = |acc, w| acc + w