Ask Your Question

Revision history [back]

how to find distance matrix in order?

helm111={'1':['2','3','4'],'2':['5','4'],'3':['6','4'],'4':['7']} Graph(helm111) D99=Graph(helm111).distance_matrix()

i need to find distance matrix in order of vertices 1,2,3,5,6,8,4,7,9,11,10.

how to find distance matrix in order?

helm111={'1':['2','3','4'],'2':['5','4'],'3':['6','4'],'4':['7']} After defining:

helm111 = {'1': ['2', '3', '4'], '2': ['5', '4'], '3': ['6', '4'], '4': ['7']}
Graph(helm111)
D99=Graph(helm111).distance_matrix()

D99 = Graph(helm111).distance_matrix()

i need to find distance matrix in order of vertices 1,2,3,5,6,8,4,7,9,11,10.