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