MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / floy

Function floy

Graphs/basic_graphs.py:190–200  ·  view source on GitHub ↗
(A_and_n)

Source from the content-addressed store, hash-verified

188
189
190def floy(A_and_n):
191 (A, n) = A_and_n
192 dist = list(A)
193 path = [[0] * n for i in xrange(n)]
194 for k in xrange(n):
195 for i in xrange(n):
196 for j in xrange(n):
197 if dist[i][j] > dist[i][k] + dist[k][j]:
198 dist[i][j] = dist[i][k] + dist[k][j]
199 path[i][k] = k
200 print(dist)
201
202
203"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected