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_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)
def test_fillIn_ordering_6(self): G = Graph(V_Pappus, E_Pappus) O = tdlib.fillIn_ordering(G) self.assertEqual(True, util.is_permutation(O));
def test_fillIn_ordering_3(self): G = Graph(V_Petersen, E_Petersen) O = tdlib.fillIn_ordering(G) self.assertEqual(True, util.is_permutation(O));