#17132: Perfect Matchings for Graphs
-------------------------------------+-------------------------------------
       Reporter:  ayyer              |        Owner:
           Type:  task               |       Status:  new
       Priority:  minor              |    Milestone:  sage-6.4
      Component:  graph theory       |   Resolution:
       Keywords:  perfect            |    Merged in:
  matchings, graphs                  |    Reviewers:
        Authors:  Arvind Ayyer       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  6091b96904f172d6aea9e4926cb14257850c77ea
  public/ayyer/perfect_matchings     |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ayyer):

 Replying to [comment:16 vferay]:
 > the bug comes from the perfect matching library: when elements of the
 base set are themselves pairs of integers, the function 'flatten' goes too
 far... I guess that adding the optional argument 'max_level=1' to all
 'flatten' functions in the PerfectMatching library should solve the
 problem.

 Oh I see. Let me know if you want me to open a new ticket. I can review it
 too if you like.

 > I have another question : for the moment, you return perfect matchings
 as a list of pairs. Mathematically, I think it is more logical to treat it
 as a set of sets (two perfect matchings which differ by a permutations of
 the pairs are equal). But perhaps turning it into a set in sage would
 imply unnecessary copies/tests, so I wonder what is the best choice...

 I am more familiar with Maple, where I would have indeed treated the
 object as a set of sets. I also find it natural to think of undirected
 edges as sets and directed ones as lists, but that doesn't seem to be the
 system followed here. In my short time with Sage, I find lists to be
 easier to manipulate overall.

 Does the class {{{PerfectMatchings}}} treat the object as a set of sets?
 If so, the user can choose what he/she prefers, once I add the option.

--
Ticket URL: <http://trac.sagemath.org/ticket/17132#comment:19>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to