Opened 12 years ago

Closed 11 years ago

#11314 closed enhancement (fixed)

Enhance method from_shape_and_word in tableau to allow English reading order

Reported by: Hugh Thomas Owned by: Sage Combinat CC user
Priority: major Milestone: sage-4.7.1
Component: combinatorics Keywords: days30, tableaux
Cc: Sage Combinat CC user Merged in: sage-4.7.1.alpha3
Authors: Hugh Thomas Reviewers: Anne Schilling
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Enhance method from_shape_and_word in tableau to allow English reading order.

Attachments (2)

trac_11314-tableau-from-shape-and-word-ht.patch (2.0 KB) - added by Hugh Thomas 12 years ago.
trac_11314-tableau-from-shape-and-word-final.patch (2.2 KB) - added by Anne Schilling 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by Hugh Thomas

comment:1 Changed 12 years ago by Anne Schilling

Reviewers: Anne Schilling
Status: newneeds_review

This patch adds the feature of transforming words to tableaux from the English reading order. I checked that all tests pass in the combinat folder. If buildbot agrees that all tests pass, this is a positive review.


comment:2 Changed 12 years ago by Anne Schilling

Status: needs_reviewpositive_review

comment:3 Changed 12 years ago by Nicolas M. Thiéry

Status: positive_reviewneeds_work

Hi Hugh, Anne!

Thanks for the code and the review. +1 on the new option if you have a use case for it.

However, please change the interface to something like:

    sage: from_shape_and_word(shape, word, order="french")    # The default
    sage: from_shape_and_word(shape, word, order="english")

This is more expressive than:

    sage: from_shape_and_word(shape, word, False)

and will allow for later adding other reading orders (like columnwise). Besides, that's consistent with what we had (or will eventually have) for trees (order = "infix", "prefix").

As for the implementation, one can avoid duplicating the core code using:

if french:

shape = reversed(shape)

for l in shape:

res.append( list(w[j:j+l]) ) j += l

if french:



  • I got rid of the shape[i] at the occasion
  • I did not test it!

Last point: did you check how this commuted with Jason's patch?



Changed 12 years ago by Anne Schilling

comment:4 Changed 12 years ago by Anne Schilling

Status: needs_workpositive_review

Thanks, Nicolas for the suggestions! I uploaded the new version and set it back to positive review.

Yes, on the sage-combinat queue I updated Jason's tableaux category patch and it commutes with Hugh's patch.



Apply: trac_11314-tableau-from-shape-and-word-final.patch

comment:5 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-4.7.1.alpha3
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.