Returns the shortest path length from source to target in a weighted graph G.
Uses a bidirectional version of Dijkstra’s algorithm.
Edge data must be numerical values for XGraph and XDiGraphs. The weights are assigned to be 1 for Graphs and DiGraphs.
See also bidirectional_dijkstra for more information about the algorithm.