def test_FI(self): print("---FI---") for i in range(0, COUNT+1): base.print_graph_name(PREFIX, i) G = Graph(eval(PREFIX+".V_"+str(i)), eval(PREFIX+".E_"+str(i))) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
def test_FI(self): print("---FI---") for i in range(0, COUNT+1): G = Graph(eval(PREFIX+".V_"+str(i)), eval(PREFIX+".E_"+str(i))) base.print_graph_name(PREFIX, i) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
def test_fillIn_decomp_8(self): for i in range(0, 10): V, E = randomGNP(20, 0.2) G = Graph(V, E) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)
def test_fillIn_decomp_7(self): G = Graph(V_Grid_5_5, E_Grid_5_5) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True) self.assertEqual(w, 5)
def test_fillIn_decomp_6(self): G = Graph(V_Pappus, E_Pappus) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True) self.assertEqual(w, 6)
def test_fillIn_decomp_5(self): G = Graph(V_Wagner, E_Wagner) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True) self.assertEqual(w, 4)
def test_fillIn_decomp_4(self): G = Graph(V_Petersen_double, E_Petersen_double) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True) self.assertEqual(w, 4)
def test_fillIn_decomp_0(self): for V, E in cornercases: G = Graph(V, E) T, w = tdlib.fillIn_decomp(G) self.assertEqual(tdlib.is_valid_treedecomposition(G, T), True)