Permutations |
Permutation of matrix columns/rows is specified by array of indices which denote the order of columns/rows in the resulting matrix. Note that indices start from 0.
Operation | Description | Performance |
---|---|---|
column permutation | Permutes columns of the matrix. | |
row permutation | Permutes rows of the matrix. |
Consider our matrix is:
1IntegerArray order = new IntegerArray { 1, 2, 0, 3 }; 2A.PermuteColumns(order);
The result will be
Rows permutation for the same matrix :
1IntegerArray order = new IntegerArray { 2, 1, 0 }; 2A.PermuteRows(order);
The result will be