Skip to content

transpose_matrixTransposeMatrixTransposeMatrixtranspose_matrixT_transpose_matrix๐Ÿ”—

Short description๐Ÿ”—

transpose_matrixTransposeMatrixTransposeMatrixtranspose_matrixT_transpose_matrix โ€” Transpose a matrix.

Signature๐Ÿ”—

transpose_matrix( matrix MatrixID, out matrix MatrixTransposedID )void TransposeMatrix( const HTuple& MatrixID, HTuple* MatrixTransposedID )static void HOperatorSet.TransposeMatrix( HTuple matrixID, out HTuple matrixTransposedID )def transpose_matrix( matrix_id: HHandle ) -> HHandle

Herror T_transpose_matrix( const Htuple MatrixID, Htuple* MatrixTransposedID )

HMatrix HMatrix::TransposeMatrix( ) const

HMatrix HMatrix.TransposeMatrix( )

Description๐Ÿ”—

The operator transpose_matrixTransposeMatrix returns the transpose of the input Matrix. The input matrix is defined by the matrix handle MatrixIDmatrixIDmatrix_id. A new matrix MatrixTransposed is generated with the result and the matrix handle MatrixTransposedIDmatrixTransposedIDmatrix_transposed_id of this matrix is returned. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixGetFullMatrix.

Example:

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & -2.0 \\ -5.0 & 7.0 & 2.0 \\ -9.0 & -4.0 & 1.0 \end{array} \right] \qquad \to \qquad \texttt{MatrixTransposed} = \left[ \begin{array}{rrr} 3.0 & -5.0 & -9.0 \\ 1.0 & 7.0 & -4.0 \\ -2.0 & 2.0 & 1.0 \end{array} \right] \end{eqnarray*}\]

Execution information๐Ÿ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters๐Ÿ”—

MatrixIDmatrixIDmatrix_id (input_control) matrix โ†’ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle of the input matrix.

MatrixTransposedIDmatrixTransposedIDmatrix_transposed_id (output_control) matrix โ†’ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle with the transpose of the input matrix.

Result๐Ÿ”—

If the parameters are valid, the operator transpose_matrixTransposeMatrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

create_matrixCreateMatrix

Possible successors

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

Alternatives

transpose_matrix_modTransposeMatrixMod

See also

invert_matrixInvertMatrix, invert_matrix_modInvertMatrixMod

References๐Ÿ”—

David Poole: โ€œLinear Algebra: A Modern Introductionโ€; Thomson; Belmont; 2006.

Gene H. Golub, Charles F. van Loan: โ€œMatrix Computationsโ€; The Johns Hopkins University Press; Baltimore and London; 1996.

Module๐Ÿ”—

Foundation