Exemple #1
0
 def test_clique(self):
     # Assert node cliques.
     v = graph.clique(self.g, "a")
     self.assertEqual(v, ["a", "b"])
     self.g.add_edge("b", "c")
     v = graph.clique(self.g, "a")
     self.assertEqual(v, ["a", "b", "c"])
     v = graph.cliques(self.g, 2)
     self.assertEqual(v, [["a", "b", "c"], ["b", "d"], ["d", "e"], ["x", "y"]])
     print "pattern.graph.clique()"
     print "pattern.graph.cliques()"
Exemple #2
0
 def test_clique(self):
     # Assert node cliques.
     v = graph.clique(self.g, "a")
     self.assertEqual(v, ["a","b"])
     self.g.add_edge("b","c")
     v = graph.clique(self.g, "a")
     self.assertEqual(v, ["a","b","c"])
     v = graph.cliques(self.g, 2)
     self.assertEqual(v, [["a","b","c"], ["b","d"], ["d","e"], ["x","y"]])
     print "pattern.graph.clique()"
     print "pattern.graph.cliques()"