dkh.graph.dijkstra

calc shortest path

  • Declaration

    struct DijkstraInfo(T);

    information of shortest path

    • Declaration

      T[] dist;

      distance

    • Declaration

      int[] from;

      there is a shortest path (s, ..., from[i], i)

  • Declaration

    DijkstraInfo!D dijkstra(D, T)(T g, int s, D inf = D.max);

    calc shortest path with O(ElogE)

  • Declaration

    DijkstraInfo!D dijkstraDense(D, T)(T g, int s, D inf = D.max);

    calc shortest path with O(V^2)