1 | initial version |
Something like this should do the job:
def MyFactor(G):
A = G.automorphism_group()
Orb = A.orbits()
return Graph([list(Orb), [(o1,o2) for o1,o2 in Combinations(Orb,2) if any(G.has_edge(e1,e2) for e1 in o1 for e2 in o2)]])
MyFactor( graphs.FlowerSnark() ).show()