Macaulay2 » Documentation
Packages » Tableaux :: toIndex
next | previous | forward | backward | up | index | toc

toIndex -- get the index of a box, given its position

Description

The boxes in entries T fill the tableau from top to bottom, and left to right. Hence, a position (i,j) corresponds to an index k in entries T

i1 : T = youngTableau(new Partition from {6,3,2}, new Partition from {2}, toList(10..18))

               ┌────┬────┬────┬────┐
o1 =           │ 10 │ 11 │ 12 │ 13 │
     ┌────┬────┼────┼────┴────┴────┘
     │ 14 │ 15 │ 16 │               
     ├────┼────┼────┘               
     │ 17 │ 18 │                    
     └────┴────┘                    

o1 : YoungTableau
i2 : thePosition = (1,2)

o2 = (1, 2)

o2 : Sequence
i3 : T_thePosition

o3 = 16
i4 : theIndex = toIndex(T,thePosition)

o4 = 6
i5 : (entries T)#theIndex

o5 = 16

We may replace the filling in each box with its index to see the order.

i6 : youngTableau(new Partition from {6,3,2}, new Partition from {2}, toList(0..(size T - 1)))

             ┌───┬───┬───┬───┐
o6 =         │ 0 │ 1 │ 2 │ 3 │
     ┌───┬───┼───┼───┴───┴───┘
     │ 4 │ 5 │ 6 │            
     ├───┼───┼───┘            
     │ 7 │ 8 │                
     └───┴───┘                

o6 : YoungTableau

We may also replace the filling in each box with the corresponding position.

i7 : entryList = for i from 0 to size T - 1 list toPosition(T,i)

o7 = {(0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1)}

o7 : List
i8 : youngTableau(new Partition from {6,3,2}, new Partition from {2}, entryList)

                       ┌────────┬────────┬────────┬────────┐
o8 =                   │ (0, 2) │ (0, 3) │ (0, 4) │ (0, 5) │
     ┌────────┬────────┼────────┼────────┴────────┴────────┘
     │ (1, 0) │ (1, 1) │ (1, 2) │                           
     ├────────┼────────┼────────┘                           
     │ (2, 0) │ (2, 1) │                                    
     └────────┴────────┘                                    

o8 : YoungTableau

See also

Ways to use toIndex:

  • toIndex(Sequence,YoungTableau)
  • toIndex(YoungTableau,Sequence)

For the programmer

The object toIndex is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Tableaux/documentation.m2:1381:0.