#20061: Add method for finding all perfect matchings to Graph
-------------------------------------+-------------------------------------
       Reporter:  egunawan           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-7.1
      Component:  graph theory       |   Resolution:
       Keywords:  perfect matching,  |    Merged in:
  graph                              |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  u/egunawan/20061   |  1bea58a4708b8e02e148e7755d772f603934743d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Hello,

 Some remarks:

 - You will notice that all methods in graph.py are decorated with
 `doc_index`, which makes them appear in the index of functions of that
 file. As it is missing in your branch, I expect that your function appears
 in the 'uncategorized' section of this table.

 - The function will appear in this index of function, and the style of its
 description is a bit at odds with others: we usually have something like
 'returns an interator over the perfect matchings of the graph'. Note that
 in the context of this table, 'self' does not appear anywhere.

 - In order to test whether a graph is empty, you can do `if G`. What you
 do is build the list of vertices and throw it away at every call of the
 function, uselessly.

 - You build the list a second time to pick `v`, to throw everything away
 except its first element. You would achieve the same with `v =
 next(self.vertex_iterator())`.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/20061#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to