Returns the shortest path lengths from source to all other reachable nodes in a weighted graph G.
Uses Dijkstra’s algorithm.
Returns a dictionary of shortest path lengths keyed by source.
Edge data must be numerical values for XGraph and XDiGraphs. The weights are assigned to be 1 for Graphs and DiGraphs.
See also single_source_dijkstra for more information about the algorithm.