#11314: Enhance method from_shape_and_word in tableau to allow English reading
order
------------------------------+---------------------------------------------
   Reporter:  hthomas         |          Owner:  sage-combinat   
       Type:  enhancement     |         Status:  needs_work      
   Priority:  major           |      Milestone:  sage-4.7.1      
  Component:  combinatorics   |       Keywords:  days30, tableaux
Work_issues:                  |       Upstream:  N/A             
   Reviewer:  Anne Schilling  |         Author:  Hugh Thomas     
     Merged:                  |   Dependencies:                  
------------------------------+---------------------------------------------
Changes (by nthiery):

  * status:  positive_review => needs_work


Comment:

 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:
         res.reverse()

 Notes:
  - 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?

 Cheers,
                         Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11314#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac?hl=en.

Reply via email to