#15998: Restore some documentation and doctests and a function removed with 
#15466
-------------------------------------+-------------------------------------
       Reporter:  darij              |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Darij Grinberg     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/combinat/re-15466           |  75ef295edc710baa645c92647002e6d0e0c5eb5f
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Ahahahahaahah. Okay, thanks to trac I know how old my latest comment is,
 and I can claim that I spent the last 82 minutes looking at this very line
 :
 {{{
 while t > (k-h-1) * r:
 }}}

 I was totally sure that the `>` should be a `>=` or that there should be a
 +1 somewhere, but NO WAY, I made tests and it was right. AAaaaaaaand
 that's all because of this cursed line
 {{{
 t = m - h + 1
 }}}
 Which I expected to be the sum of the elements to the right of `x[h]`, and
 which contained this cursed `+1`. Ahahaha. And of course because clearly
 in my head `m` was the length of the partition.... And not `m+1`.

 AHAHahahahahahahaha. Crazy. I'm late now.

 Anyway, your code is good, I added a couple of comments, I removed the one
 which wrongly claims that the function is recursive, and if you agree with
 my last commit you can set this ticket to `positive_review`.

 Gosh.

 Oh, and thanks again for taking the time to do a good job. At first we had
 a hidden (fast) function to replace a slow exposed function, and now not
 only everything is fast but you implemented a faster enumeration
 algorithm. Ahahahah.

 Oh, and by the way : you say in the docstring that you don't know if this
 is the best possible ? Well, I believe that I can remove the
 multiplication in `t > (k-h-1) * r` at the cost of another "if", but given
 that you output Python lists I would say that it is negligible. Good job,
 and thank for this code `:-)`

 Nathann

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