示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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()))
示例#5
0
 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)
示例#6
0
 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)
示例#7
0
 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)
示例#8
0
 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()))
示例#9
0
 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)
示例#10
0
 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)