MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / dijkstra

Function dijkstra

src/graph/dijkstra.rs:15–52  ·  view source on GitHub ↗

performs Dijsktra's algorithm on the given graph from the given start the graph is a positively-weighted directed graph returns a map that for each reachable vertex associates the distance and the predecessor since the start has no predecessor but is reachable, map[start] will be None Time: O(E * logV). For each vertex, we traverse each edge, resulting in O(E). For each edge, we insert a new sho

(
    graph: &Graph<V, E>,
    start: V,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

insertMethod · 0.45
getMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected