On 2012-11-28, Anne Schilling <a...@math.ucdavis.edu> wrote:
> On 11/28/12 5:35 AM, Dima Pasechnik wrote:
>> On 2012-11-27, Travis Scrimshaw <tsc...@ucdavis.edu> wrote:
>>> ------=_Part_468_5000489.1354057101700
>>> Content-Type: text/plain; charset=ISO-8859-1
>>>
>>> Hey everyone,
>>>    I've been trying to figure out how to handle generalized 
>>> permutations (a.k.a. two-line arrays, bi-words, ...) since we want 
>>> Permutation() to only accept input from 1 to n. 
>> A typical misuse of Permutation is in 
>> sage/combinat/integer_vector_weighted.py
>> where nothing prevents one to return lists all the time.
>> Cf. e.g. the relevant part of 
>> http://trac.sagemath.org/sage_trac/attachment/ticket/13742/trac_13742_reviewer1.patch
>> Yes, and the RSK stuff is a more tricky one.
>> 
>> I have a stupid question: why can't one just use lists?
>> One should not overdesign. What are the real 
>> reasons for GeneralizedPermutation to come? 
>> E.g. to have a special class to just handle a pair of lists of 
>> equal length is a big an overdesign to me.
>> And if you need the first list to be ordered, use a pair (set,list)
>
> Hi Dima,
>
> This last suggestion would indeed be a good idea. Where would you put the
> code in this case? The input would be a (set,list) and the output
> a pair of semistandard Young tableaux, so it is not so obvious where it
> belongs.

I guess it's a perfect illustration of **limits** of the object-oriented
approach.
RSK takes (p,q) in PxQ and outputs (a,b) in AxB. 
Does this mean we have to knock ourselves out creaing classes for each
pair of classes P,Q  we have?
And note that P and Q is so general that there are undoubtly zillions
of functions out there which can take P and Q and output something that
has absolutely nothing to do with RSK, SSYTs, even combinatorics in
general.

Just put RSK in global scope (or, better, in a package, which incorporates stuff
that deals with A and B, which here is much more restrictive than P and
Q). 
Or, if you must go OO, you can think of RSK as a constructor
for elements of AxB (do you have a class for pairs of tableaux
already?). In this way you don't need to worry about a new
class for PxQ, at least.

HTH,
Dima



>
> Best,
>
> Anne
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to