def test_minDegree_ordering_8(self): for i in range(0, 10): V, E = randomGNP(20, 0.2) G = Graph(V, E) O = tdlib.minDegree_ordering(G) self.assertEqual(len(O), len(G.vertices())) self.assertEqual(util.is_permutation(O), True)
def test_minDegree_ordering_6(self): G = Graph(V_Pappus, E_Pappus) O = tdlib.minDegree_ordering(G) self.assertEqual(len(O), len(G.vertices())) self.assertEqual(util.is_permutation(O), True)
def test_minDegree_ordering_4(self): G = Graph(V_Petersen_double, E_Petersen_double) O = tdlib.minDegree_ordering(G) self.assertEqual(len(O), len(G.vertices()))
def test_minDegree_ordering_0(self): for V, E in cornercases: G = Graph(V, E) O = tdlib.minDegree_ordering(G) self.assertEqual(len(O), len(G.vertices())) self.assertEqual(util.is_permutation(O), True)
def test_minDegree_ordering_7(self): G = Graph(V_Grid_5_5, E_Grid_5_5) O = tdlib.minDegree_ordering(G) self.assertEqual(len(O), len(G.vertices())) self.assertEqual(util.is_permutation(O), True)