> Nonon, it is just that if you now type g.complement() on a Bipartite > Graph in Sage, you will raise an exception ! My function fails only > when I call it on a bipartite Graph !
I guess my point is that a graph should be a BipartiteGraph when it makes sense. It certainly seems right to me to have graphs.CompleteBipartiteGraph(n) for example to give a BipartiteGraph. The error message should indicate clearly and easily how to change this, i.e. get a non-B.G. copy of the object, which is a normal graph. > ticket about edge addition, but there is no way for a normal user to > think of it as something else than a bug in Sage, or a very bad idea > of class design... :-/ This *is* a bug in complement! It should either check for the Bipartite case or (in my preference) BipartiteGraph should have its own version. Maybe this is a case for bringing the coercion model into Sage's graph infrastructure (not it :). -- Robert L. Miller http://www.rlmiller.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