Quick reply inline below.

On May 12, 6:06 pm, Nathann Cohen <nathann.co...@gmail.com> wrote:
<snip>
> > These discuss (among other things) various approaches to the extra
> > constraints of the BipartiteGraph class.  In particular, we agreed
> > that add_edge() can raise an exception in cases like this where an
> > algorithm violates the bipartite constraints.  Then Robert's suggested
> > solution (which is a good one) is to implement a customized version of
> > the method in BipartiteGraph, if possible, that "does the right
> > thing."  In this case, the right thing may include implementing
> > is_perfect() for BipartiteGraph to simply return True.  We might also
> > want to implement complement() for BipartiteGraph.  The question is
> > whether it should return the Graph complement or the BipartiteGraph
> > complement given the current partition.  Probably the former.  The
> > latter could be implemented as bipartite_complement() to avoid
> > confusion.
>
> Then why should BipartiteGraph inherit from Graph or generic_graph ?
>
> Perhaps the best way to avoid confusion could be to make it as
> independent as possible from functions that may not work, and import
> them in BipartiteGraph only when they are compatible... Otherwise, by
> default, functions are added to the BipartiteGraph class while they
> can not be used...

See those other threads for a rather lengthy discussion.  The very
short summary is that many Graph and GenericGraph methods *do* work
immediately for BipartiteGraph.  The current solution was deemed the
best compromise of developer time (not writing lots of duplicate
functions) and correctness (inappropriate action will raise an
exception).  And, as you noticed, overriding is_perfect() in
BipartiteGraph avoids the whole issue with a very efficient
implementation!

> If you have some time to spend reviewing some tickets, please take any
> that plseases you in the graph theory section, for they are all mine
> and I can not review any of them ! ;-)

I saw them and will review them when I can.  We're moving our family
of seven over the next few weeks, so I'm lucky to squeeze in a few
hours of work per day.  Consequently, it will be a while before I can
get to them.  Please ping me in early June if you don't see any
progress.

Enjoy!

- Ryan

-- 
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

Reply via email to