Hi,
I am confused how the attached code ended up in the patch
kshape-om.patch
Isn't that code that I wrote at some point? I need it now for the
affine Stanley symmetric function code.
Thanks,
Anne
--------------------------------------------------------
return sage.combinat.skew_partition.SkewPartition([outer, inner])
+
+ def from_kbounded_to_reduced_word(p,k):
+ r"""
+ Maps a k-bounded partition to a reduced word for an element in
+ the affine permutation group.
+
+ EXAMPLES:
+ sage: p=Partition([2,1,1])
+ sage: p.from_kbounded_to_reduced_word(2)
+ [2, 1, 2, 0]
+ """
+ p=p.k_skew(k)[0]
+ result = []
+ while p != []:
+ corners = p.corners()
+ c = p.content(corners[0][0],corners[0][1])%(k+1)
+ result.append(Integer(c))
+ list = [x for x in corners if p.content(x[0],x[1])%(k+1) ==c]
+ for x in list:
+ p = p.remove_cell(x[0])
+ return result
+
+ def from_kbounded_to_grassmannian(p,k):
+ r"""
+ Maps a k-bounded partition to a Grassmannian element in
+ the affine Weyl group of type A_k^({1)}.
+
+ EXAMPLES:
+ sage: p=Partition([2,1,1])
+ sage: p.from_kbounded_to_grassmannian(2)
+ [-1 1 1]
+ [-2 2 1]
+ [-2 1 2]
+ """
+ from sage.combinat.root_system.weyl_group import WeylGroup
+ W=WeylGroup(['A',k,1])
+ return W.from_reduced_word(p.from_kbounded_to_reduced_word(k))
--
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" 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-combinat-devel?hl=en.