#20555: descents for Permutations : cleanup
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  chapoton               |       Status:  needs_review
           Type:         |    Milestone:  sage-7.2
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  combinatorics          |  Work issues:
       Keywords:         |       Commit:
  permutation            |  12472e04b273d8b0c54e9e2209d69d037d927486
        Authors:         |     Stopgaps:
  Frédéric Chapoton      |
Report Upstream:  N/A    |
         Branch:         |
  u/chapoton/20555       |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by stumpc5):

 A few minor questions:
 {{{
 +            for i in self.index_set():
 +                si = s[i]
 +                tester.assert_(i in si.descents(side='left'))
 +                tester.assert_(i in si.descents(side='right'))
 +                tester.assert_(i not in si.descents(positive=True,
 side='left'))
 +                tester.assert_(i not in si.descents(positive=True,
 side='right'))
 }}}
 * Is it correct to test {{{self.index_set}}}, which could in principle be
 different from {1,...,n}?
 * You could possibly be even more specific on the assertions, such as
 {{{[i] == si.descents(side='left')}}}.

 {{{
 + d = [0] + self.descents(from_zero=False) + [len(self)]
 }}}
 * Isn't this {{{+ [len(self)]}}} exactly the {{{final_descent}}} flag?

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