#15949: Involutions on NSym and QSym part II
-------------------------------------+-------------------------------------
       Reporter:  darij              |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  combinatorics      |   Resolution:
       Keywords:  partitions,        |    Merged in:
  symmetric functions, NSym, QSym,   |    Reviewers:
  NCSF, Kronecker product,           |  Work issues:
        Authors:  Darij Grinberg     |       Commit:
Report Upstream:  N/A                |  4b32534514e8d19378dc4b3dce6808190c12d6af
         Branch:  public/combinat    |     Stopgaps:
  /invol-nsym-2                      |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by tscrim):

 For this change
 {{{#!diff
 diff --git a/src/sage/combinat/ncsf_qsym/ncsf.py
 b/src/sage/combinat/ncsf_qsym/ncsf.py
 index 36eecd9..c7b0849 100644
 --- a/src/sage/combinat/ncsf_qsym/ncsf.py
 +++ b/src/sage/combinat/ncsf_qsym/ncsf.py
 @@ -664,8 +664,9 @@ class
 NonCommutativeSymmetricFunctions(UniqueRepresentation, Parent):
                  S = self.realization_of().S()
                  res = S.zero()
                  m = len(xs)
 +                ys = [xs[i] - i - 1 for i in range(m)]
                  for s in Permutations(m):
 -                    psco = [xs[i] + s[i] - i - 1 for i in range(m)]
 +                    psco = [ys[i] + s[i] for i in range(m)]
                      if not all(j >= 0 for j in psco):
                          continue
                      psco2 = [j for j in psco if j != 0]
 }}}
 its (slightly) faster to use `enumerate`:
 {{{
 ys = [x - i - 1 for i,x in enumerate(xs)]
 }}}
 and
 {{{
 psco = [y + s[i] for i,y in enumerate(ys)]

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