Thanks for pointing to the new thread. :-) Yes, the same problem exists for add_edge(). At a minimum, and add/ delete vertex and add edge code needs to be overridden for BipartiteGraph. I've done the delete vertex and can do the others, but I wanted to clear up the "long-term" approach first.
- Ryan On Feb 27, 2:30 pm, Rob Beezer <goo...@beezer.cotse.net> wrote: > Hi Ryan, > > Thanks for working on this. I didn't even know this class > existed. ;-) Some comments. > > +1 to Robert Miller's suggestion that a new vertex should be assigned > to one part of the bipartition in the call, or else an error will be > raised. At a minimum, encountering such an error will let somebody > know they are dealing with something a little more specialized than a > Graph (eg if they come by a BipartiteGraph through one of the graph > generators). This strikes me as the cleanest way to go. > > Is there a basic problem with add_edge() as well? I build a > BipartiteGraph, B, on 4 vertices with two disjoint edges, then add a > couple more edges to form a triangle, and then > > sage: type(B) > <class 'sage.graphs.bipartite_graph.BipartiteGraph'> > sage: B.bipartite_sets() > <BOOM> > RuntimeError: Graph is not bipartite. > > Robert Bradshaw has some thoughts on organization > here:http://groups.google.com/group/sage-devel/browse_thread/thread/6a2ed7... > > 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