Performs an in-place permutation of columns of a matrix specified by a column-major two-dimensional array with respect to an array of integral indices of the columns.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in,out] | column_matrix | A pointer to a two dimensional array of elements which represent a column-major matrix to rearrange in place. |
| columns | A number of columns in the matrix to rearrange. |
| rows | A number of rows in the matrix to rearrange. |
[in] | permutation_indices | A pointer to an array of integral indices of columns in column_matrix in the desired order. |
- Exceptions
-
Any | exceptions that originate from swapping of two elements of column_matrix . |
In order to keep the original matrix intact and construct the result of the permutation in an uninitialized buffer, use rearrange_matrix_copy.
In order to write the result of the buffer and replace some other matrix with the result of the permutation, use rearrange_matrix_copy.