On Dec 14, 11:04 am, fidelbc <fidel.barr...@gmail.com> wrote: > And I think the problem arises when taking complement. > > sage: g.complement() > ... > RuntimeError: Edge vertices must lie in different partitions. > > Perhaps the complement is constructed as a bipartite graph too, which > is not true in general.
Yes, it would appear that the generic complement() method is adding edges to a bipartite graph object and the error is coming from the bipartite graph routines complaining about an illegitimate edge. I would imagine that temporarily you could convert your bipartite graph to a generic graph before taking the complement. Long-term, maybe the bipartite graph object should implement its own complement, which creates a generic graph and then calls the generic complement on that? (Though I have not studied the situation too carefully.) Can you make a Trac ticket and point back to this discussion? Thanks, Rob Rob -- 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