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

applyPositions -- apply a function to all positions of boxes in a tableau

Description

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

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

o1 : YoungTableau
i2 : applyPositions(T, thePosition -> thePosition)

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

o2 : YoungTableau
i3 : applyPositions(T, thePosition -> thePosition#1 - thePosition#0)

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

o3 : YoungTableau
i4 : applyPositions(T, thePosition -> (T_thePosition)^2)

               ┌────┬────┬────┬────┐
o4 =           │ 0  │ 1  │ 4  │ 9  │
     ┌────┬────┼────┼────┴────┴────┘
     │ 16 │ 25 │ 36 │               
     ├────┼────┼────┘               
     │ 49 │ 64 │                    
     └────┴────┘                    

o4 : YoungTableau

See also

Ways to use applyPositions:

  • applyPositions(YoungTableau,Function)

For the programmer

The object applyPositions 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:278:0.