Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Robert Miller
> 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 ha

Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Nathann Cohen
> Maybe the problem is that somewhere in the depths of is_perfect, a > BipartiteGraph is being created without the intention to use it that > way. Perhaps it is in self.complement(), or some other function that > is implicitly assuming to use the current class to make a copy, when > it should be ma

Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Robert Miller
Maybe the problem is that somewhere in the depths of is_perfect, a BipartiteGraph is being created without the intention to use it that way. Perhaps it is in self.complement(), or some other function that is implicitly assuming to use the current class to make a copy, when it should be making a cop

[sage-devel] BipartiteGraphs

2010-05-11 Thread Nathann Cohen
Hello Everybody I was working on a function is_perfect, which tests whether a given graph is perfect. This function has the bad idea to compute the complement of a graph. Writing the docstrings, I wrote that Bipartite Graphs are obviously perfect, which is perfectly true. Here is what happens in