Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Definition of a distance matrix in distance_matrix() is misleading #232

@BoundaryValueProblems

Description

@BoundaryValueProblems

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions