Exemple #1
0
 def test_8(self):
     for n in range(0, 13):
         for i in range(0, 10):
             V, E = randomGNP(n, 0.2)
             G = Graph(V, E)
             T, w = tdlib.exact_decomposition_ex17(G)
             self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
Exemple #2
0
 def test_7(self):
     G = Graph(V_Grid_5_5, E_Grid_5_5)
     T, w = tdlib.exact_decomposition_ex17(G)
     self.assertEqual(w, 5)
     self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
Exemple #3
0
 def test_6(self):
     G = Graph(V_Pappus, E_Pappus)
     T, w = tdlib.exact_decomposition_ex17(G)
     self.assertEqual(w, 6)
     self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
Exemple #4
0
 def test_5(self):
     G = Graph(V_Wagner, E_Wagner)
     T, w = tdlib.exact_decomposition_ex17(G)
     self.assertEqual(w, 4)
     self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
Exemple #5
0
 def test_4(self):
     G = Graph(V_Petersen_double, E_Petersen_double)
     T, w = tdlib.exact_decomposition_ex17(G)
     self.assertEqual(w, 4)
     self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
Exemple #6
0
 def test_0(self):
     for V, E in cornercases:
         G = Graph(V, E)
         T, w = tdlib.exact_decomposition_ex17(G)
         self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)