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

positionList -- get the positions of all the boxes in a tableau

Description

This method is useful for iterating over all positions in a tableau.

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 : theList = positionList T

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

o2 : List
i3 : T' = youngTableau(new Partition from {6,3,2}, new Partition from {2}, theList)

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

o3 : YoungTableau

Including a function returns only the positions that return true. For example, the following code returns all positions of corners in the tableau, using function isCorner.

i4 : positionList(T, thePosition -> isCorner(thePosition,T))

o4 = {(0, 5), (1, 2), (2, 1)}

o4 : List

See also

Ways to use positionList:

  • positionList(YoungTableau)
  • positionList(YoungTableau,Function)

For the programmer

The object positionList 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:937:0.