Exemplo n.º 1
0
 def test_path(self):
     (lengths, prev) = bellman_ford(self.graph, 0)
     self.assertEqual(util.get_path_from_prev(prev, 8), [0, 1, 2])
Exemplo n.º 2
0
 def test_path(self):
     (lengths, prev) = dijkstra(self.graph, 0)
     self.assertEqual(util.get_path_from_prev(prev, 8), [0, 1, 2])