Hi Martin, hi Vincent,

On Thu, Mar 15, 2012 at 08:43:47AM +0100, Martin Rubey wrote:
> I was using lrcalc, and noticed that supplying the weight keyword does
> not work, not even the doctest:  (this is on sage 4.8)
> 
> lrcalc.lrskew([3,2,1], [2], weight=[3,1])
> 
> gives "1 not in alphabet".
> 
> I found that the problem is that the row_word of a skew tableau expects
> its entries to be from ZZ, while lrcalc uses int's.
> 
> If this is not known, how should it be fixed?  Should we convert the
> entries of the tableau returned by lrcalc to ZZ's or only when computing
> the row_word?

For the record, this only appears when alphabet-vd.patch is
applied. Without it, the doctest pass (4.8, 5.0):

    sage: import sage.libs.lrcalc.lrcalc
    sage: sage.libs.lrcalc.lrcalc.lrskew([3,2,1], [2], weight=[3,1])
    [[[None, None, 1], [1, 1], [2]]]

That being said, internally, this tableau indeed contains ints:

    sage: t = sage.libs.lrcalc.lrcalc.lrskew([3,2,1], [2], weight=[3,1])[0]
    sage: type(t[2][0])
    <type 'int'>

Whereas the same tableau build from the command line would be filled
with Integers::

    sage: t2 = SkewTableau([[None, None, 1], [1, 1], [2]])
    sage: type(t2[2][0])
    <type 'sage.rings.integer.Integer'>

Well, at least, those two tableaux are equal:

    sage: t == t2
    True

I let the tableau fans decide whether we want to enforce that all
entries of a (skew) tableau are Integers, and if yes to write a patch
on lrcalc to convert the ints to Integers. We could throw this in the
ticket #12284 which will make lrcalc a standard Sage package.

Cheers,

                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
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