(dist, v)
| 6 | |
| 7 | |
| 8 | def _print_dist(dist, v): |
| 9 | print("\nThe shortest path matrix using Floyd Warshall algorithm\n") |
| 10 | for i in range(v): |
| 11 | for j in range(v): |
| 12 | if dist[i][j] != float("inf"): |
| 13 | print(int(dist[i][j]), end="\t") |
| 14 | else: |
| 15 | print("INF", end="\t") |
| 16 | print() |
| 17 | |
| 18 | |
| 19 | def floyd_warshall(graph, v): |