Performs an in-place transposition of a matrix.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in,out] | column_matrix | A pointer to a matrix, of columns by rows elements, to transpose. |
| columns | A number of columns in the matrix to transpose. |
| rows | A number of rows in the matrix to transpose. |
- Exceptions
-
std::bad_alloc | The function failed to allocate necessary memory to complete the operation due to lack of system resources. |
Any | exception generated from copy-assignment or swapping of ValueType elements. |
To transpose a matrix writing the result to a different buffer and leaving the original matrix intact, use either transpose_construct, if the destination buffer is not initialized with any ValueType
elements, or transpose_copy to replace existing contents of the destination buffer with the transposed copy of the original matrix.