Changes between Initial Version and Version 1 of Ticket #17920, comment 52


Ignore:
Timestamp:
03/16/15 14:32:48 (5 years ago)
Author:
aschilling
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17920, comment 52

    initial v1  
    1 Replying to [comment:40 jdemeyer]:
    2 > Replying to [comment:39 nthiery]:
    3 > > Please do not change the enumeration order, at least as default
    4 > I disagree with this: the default should be "do not sort, return stuff in the fastest possible way". Sorting an iterator is very expensive and should only be done if really needed.
    5 >
    6 > > quite some code depends on it
    7 > Is that really true? The only doctest failures that I saw where "obvious" failures where some list order changed, I didn't see anything subtle.
    8 
    9 What about
    10 {{{
    11 sage: spc = SymmetricGroupRepresentation([2,2,1], 'orthogonal')
    12 sage: spc([1,3,2,4,5])
    13 [       -1/2 1/2*sqrt(3)           0           0           0]
    14 [1/2*sqrt(3)         1/2           0           0           0]
    15 [          0           0        -1/2 1/2*sqrt(3)           0]
    16 [          0           0 1/2*sqrt(3)         1/2           0]
    17 [          0           0           0           0          -1]
    18 }}}
    19 The output is a matrix which should really be indexed by conjugacy classes of $S_n$, i.e. partitions. So the order here matters since currently it means that the rows and columns are labelled by
    20 {{{
    21 sage: Partitions(5).list()
    22 [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]
    23 }}}
    24 If the order changes all the matrices need to be changed as well, I think.
    25