distances_from_graph function

Compute Distance Matrix from Graph