transpose ( matrix -- newmatrix )
Matrix operations

Prev:dimension ( matrix -- dimension )
Next:anti-transpose ( matrix -- newmatrix )


Vocabulary
math.matrices

Inputs
matrixa matrix


Outputs
newmatrixa matrix


Word description
Transpose the input matrix over its main-diagonal. The main diagonal itself is preserved, whereas the anti-diagonal is reversed.

Notes
This word is an alias for flip, so that it may be recognised as the common mathematical operation.
This word is the opposite variant of anti-transpose.


Examples
USING: math.matrices sequences prettyprint ; 5 <iota> <anti-diagonal-matrix> transpose .
{ { 0 0 0 0 4 } { 0 0 0 3 0 } { 0 0 2 0 0 } { 0 1 0 0 0 } { 0 0 0 0 0 } }


Definition