Ejemplo n.º 1
0
 def test_euler_dfs(self):
     algorithm = EulerianCycleDFS(self.G)
     algorithm.run(6)
     expected_cycle = [6, 4, 0, 1, 4, 5, 2, 3, 5, 6]
     self.assertEqual(len(algorithm.eulerian_cycle), len(self.edges) + 1)
     self.assertEqual(algorithm.eulerian_cycle, expected_cycle)
Ejemplo n.º 2
0
 def test_euler_dfs(self):
     algorithm = EulerianCycleDFS(self.G)
     algorithm.run(6)
     expected_cycle = [6, 4, 0, 1, 4, 5, 2, 3, 5, 6]
     self.assertEqual(len(algorithm.eulerian_cycle), len(self.edges) + 1)
     self.assertEqual(algorithm.eulerian_cycle, expected_cycle)