next | previous | forward | backward | up | top | index | toc | Macaulay2 website
SparseResultants :: permute

permute -- permute the dimensions of a multidimensional matrix

Synopsis

Description

According to the definition given on page 449 of the book Discriminants, Resultants, and Multidimensional Determinants, the output of this method is $s'(M)$, where $s'$ is the inverse permutation of $s$.

i1 : M = genericMultidimensionalMatrix {4,3,2}

o1 = {{{a     , a     }, {a     , a     }, {a     , a     }}, {{a     ,
         0,0,0   0,0,1     0,1,0   0,1,1     0,2,0   0,2,1       1,0,0 
     ------------------------------------------------------------------------
     a     }, {a     , a     }, {a     , a     }}, {{a     , a     },
      1,0,1     1,1,0   1,1,1     1,2,0   1,2,1       2,0,0   2,0,1  
     ------------------------------------------------------------------------
     {a     , a     }, {a     , a     }}, {{a     , a     }, {a     ,
       2,1,0   2,1,1     2,2,0   2,2,1       3,0,0   3,0,1     3,1,0 
     ------------------------------------------------------------------------
     a     }, {a     , a     }}}
      3,1,1     3,2,0   3,2,1

o1 : 3-dimensional matrix of shape 4 x 3 x 2 over ZZ[a     ..a     ]
                                                      0,0,0   3,2,1
i2 : permute(M,{1,0,2})

o2 = {{{a     , a     }, {a     , a     }, {a     , a     }, {a     ,
         0,0,0   0,0,1     1,0,0   1,0,1     2,0,0   2,0,1     3,0,0 
     ------------------------------------------------------------------------
     a     }}, {{a     , a     }, {a     , a     }, {a     , a     },
      3,0,1       0,1,0   0,1,1     1,1,0   1,1,1     2,1,0   2,1,1  
     ------------------------------------------------------------------------
     {a     , a     }}, {{a     , a     }, {a     , a     }, {a     ,
       3,1,0   3,1,1       0,2,0   0,2,1     1,2,0   1,2,1     2,2,0 
     ------------------------------------------------------------------------
     a     }, {a     , a     }}}
      2,2,1     3,2,0   3,2,1

o2 : 3-dimensional matrix of shape 3 x 4 x 2 over ZZ[a     ..a     ]
                                                      0,0,0   3,2,1
i3 : permute(M,{2,0,1})

o3 = {{{a     , a     , a     }, {a     , a     , a     }, {a     , a     ,
         0,0,0   0,1,0   0,2,0     1,0,0   1,1,0   1,2,0     2,0,0   2,1,0 
     ------------------------------------------------------------------------
     a     }, {a     , a     , a     }}, {{a     , a     , a     }, {a     ,
      2,2,0     3,0,0   3,1,0   3,2,0       0,0,1   0,1,1   0,2,1     1,0,1 
     ------------------------------------------------------------------------
     a     , a     }, {a     , a     , a     }, {a     , a     , a     }}}
      1,1,1   1,2,1     2,0,1   2,1,1   2,2,1     3,0,1   3,1,1   3,2,1

o3 : 3-dimensional matrix of shape 2 x 4 x 3 over ZZ[a     ..a     ]
                                                      0,0,0   3,2,1

See also

Ways to use permute :

For the programmer

The object permute is a method function.