I just started using Graphs.jl, but the definition of a distance matrix of a given graph g that is returned from the function distance_matrix(g, eweights) is quite unconventional and misleading. In the documentation of Graphs.jl, the distance matrix is defined as follows:
If u = v, then W[u,v]=0.
If u !=v and (u,v) belongs to the edge set of g, then W[u,v] = edge weight of (u,v).
Otherwise W[u,v] = Inf.
But normally, the definition of the distance matrix of g is:
If there is paths between u and v, then W[u, v] = the minimum among the sums of the edge weights of all the paths connecting between u and v (i.e., the length of the shortest path between u and v);
If there is no path between u and v, then W[u,v] = Inf.
Has someone implemented this correct version of the distance matrix using Graphs.jl functions?
Thanks!
BVPs