From: Jon Harrop on
Given a graph represented as edges between vertices, such as the following:

g = {"1" -> "2", "1" -> "10", "1" -> "11", "2" -> "3", "2" -> "18",
"3" -> "4", "3" -> "12", "4" -> "5", "4" -> "19", "5" -> "6",
"5" -> "13", "6" -> "7", "6" -> "20", "7" -> "8", "7" -> "14",
"8" -> "9", "8" -> "16", "9" -> "10", "9" -> "15", "10" -> "17",
"11" -> "15", "11" -> "12", "12" -> "13", "13" -> "14",
"14" -> "15", "16" -> "20", "16" -> "17", "17" -> "18",
"18" -> "19", "19" -> "20"}

You can use GraphDistanceMatrix to compute the all-pairs shortest paths as a
matrix. However, without knowledge of the mapping from vertex names to
indices in the resulting matrix, the output is useless. So how are you
supposed to use this function?

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com


 | 
Pages: 1
Prev: Simple Q
Next: Ignore my past two posts