On Tue, Apr 24, 2012 at 6:51 AM, Nathann Cohen <[email protected]> wrote: > Helloooooooo !! > >> I vote yes. When I teach this, I call this the swapping diagram (not >> standard terminology). The number of swaps gives you the Bruhat >> length, if I remember correctly, when you regard S_n as a Coxeter group. >> The parity gives you the sign of the permutation, which gives you, in >> turn, the >> determinant of the associated matrix. It is a very useful diagram:-) > > > Hmmm.... I just took a look at it, and it seems I just can not do this for > my own purposes. I mean, this diagram can be written, but Permutations > objets basically *cannot* store a permutation between anything different > from 1 .... n > Well, it just supposes that the elements in the permutation have some > "natural linear ordering", which is the one given by the '<' python > operator. Here is the code from Permutation.inversions : > > p = self[:] > inversion_list = [] > > for i in range(len(p)): > for j in range(i+1,len(p)): > if p[i] > p[j]: > #inversion_list.append((p[i],p[j])) > inversion_list.append([i,j]) > > return inversion_list > > So it looks like I cannot trust it with my strings, for instance :-/ > > I will write this diagram anyway. It can prove useful to me later, and it > looks like you could use it anyway ^^; > It will be ticket #12872.
Okay, I added some comments there. > > Nathann > > -- > You received this message because you are subscribed to the Google Groups > "sage-edu" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sage-edu?hl=en. -- You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en.
