1 | initial version |
You can use the following function to test if a graph is complete bipartite:
def is_complete_bipartite(p):
return p.is_bipartite() and p.num_edges() == mul(map(len, p.bipartite_sets()))
Then, you can do
dd = filter(is_complete_bipartite, d)
to get your list of complete bipartites.