#13580: Parallel map reduce on SearchForest
-------------------------------------+-------------------------------------
       Reporter:  hivert             |        Owner:  hivert
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:  map-reduce,        |    Merged in:
  days57                             |    Reviewers:
        Authors:  Florent Hivert,    |  Work issues:
  Nathann Cohen                      |       Commit:
Report Upstream:  N/A                |  14b086beac66e6a3fe3bf6be2cd7ae0e28c20152
         Branch:                     |     Stopgaps:
  u/hivert/13580/map_reduce          |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by hivert):

 Replying to [comment:36 hivert]:
 > I'm much more convinced by this argument. I'm watching an exam tomorrow
 evening. I'll change my code accordingly.

 Actually, I'm not that much convinced. It's not clear for me that
 {{{
       sage: map_function = lambda x: 1,
       sage: reduce_function = lambda x,y: x+y,
       sage: reduce_init = 0
       sage: S.map_reduce(map_function, reduce_function, reduce_init)
       131071
 }}}
 is much better than
 {{{
       sage: S.map_reduce(
       ....:   map_function = lambda x: 1,
       ....:   reduce_function = lambda x,y: x+y,
       ....:   reduce_init = 0 )
 }}}
 In this second version which is the style I adopted in
 {{{map_reduce.py}}}, we don't repeat the name twice, which is better in my
 opinion.

 A third possibility is
 {{{
       sage: S.map_reduce(lambda x: 1, lambda x,y: x+y, 0)
 }}}
 It is the one used through the whole {{{backtrack.py}}} files. Unless for
 very short example, I don't find it very readable. But since it's not
 adding new code but changing old one, which needs even more cleanup and
 doc improvement, I'd rather keep it for another ticket. More precisly, I'd
 rather do that during #16351.

 What do you think ?

--
Ticket URL: <http://trac.sagemath.org/ticket/13580#comment:37>
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