Anders and Briegel in Python
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 8 gadiem
12345678910111213141516171819202122232425
  1. import cz
  2. from graph import *
  3. import viz
  4. def test_local_complementation():
  5. """ Test that local complementation works as expected """
  6. g, vops = graph()
  7. add_edge(g, 0, 1)
  8. add_edge(g, 0, 2)
  9. add_edge(g, 1, 2)
  10. add_edge(g, 0, 3)
  11. cz.local_complementation(g, vops, 0)
  12. assert has_edge(g, 0, 1)
  13. assert has_edge(g, 0, 2)
  14. assert not has_edge(g, 1, 2)
  15. assert has_edge(g, 3, 2)
  16. assert has_edge(g, 3, 1)
  17. # TODO: test VOP conditions
  18. def test_remove_vop():
  19. """ Test that removing VOPs really works """
  20. pass