MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / show_distances

Method show_distances

Graphs/dijkstra_algorithm.py:138–141  ·  view source on GitHub ↗
(self, src)

Source from the content-addressed store, hash-verified

136 self.show_distances(src)
137
138 def show_distances(self, src):
139 print("Distance from node: {}".format(src))
140 for u in range(self.num_nodes):
141 print('Node {} has distance: {}'.format(u, self.dist[u]))
142
143 def show_path(self, src, dest):
144 # To show the shortest path from src to dest

Callers 1

dijkstraMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected