The distance matrix is the matrix where entry M_(i,j) corresponds to the distance between vertex indexed i and vertex indexed j in the specified graph. If the distance between two vertexSet is infinite (i.e. the vertexSet are not connected) the matrix lists the distance as 1.




The object distanceMatrix is a method function.