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

reverseShape -- reverse the dimensions of a multidimensional matrix

Synopsis

Description

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 : reverseShape M

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

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

See also

Ways to use reverseShape :

For the programmer

The object reverseShape is a method function.