Jason, I've been working with nonisomorphic colorings recently. I use the following:
def canonical_coloring_label(G,c): """ Given a coloring dictionary, {color1 : [u1, u2, ...], color2 : [v1, v2, ... ], ... } return a string which uniquely identifies the isomorphism class of the coloring. """ H = G.copy() for i in c: H.add_edges([(i,j) for j in c[i]]) P = [G.vertices(), c.keys()] return H.canonical_label(partition=P).graph6_string() I agree, it'd be nice to not have to do this. I've been talking with Robert Miller to use the new canonical augmentation code to generate nonisomorphic colorings. With colorings, embeddings, and matchings, I wonder: should we create classes to represent these objects instead of passing around naked data structures? Then, it would make a lot of sense to have things like coloring1.is_isomorphic(coloring2). On Fri, Jan 6, 2012 at 7:42 AM, Nathann Cohen <nathann.co...@gmail.com> wrote: > And if you accept to sligthly change the graph, you can add a universal > vertex v to it. If u is of color red, color edge uv with red, and the same > for all vertices. Do this in both graph and all will be fine :-) > > Nathann > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org