Name
get_diagonal_matrixget_diagonal_matrixGetDiagonalMatrixget_diagonal_matrixGetDiagonalMatrixGetDiagonalMatrix — Get the diagonal elements of a matrix.
The operator get_diagonal_matrixget_diagonal_matrixGetDiagonalMatrixget_diagonal_matrixGetDiagonalMatrixGetDiagonalMatrix generates a new matrix
VectorVectorVectorVectorVectorvector and copies the diagonal elements of the
MatrixMatrixMatrixMatrixMatrixmatrix to this new matrix. The MatrixMatrixMatrixMatrixMatrixmatrix is
defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID. The matrix
VectorVectorVectorVectorVectorvector has one column and n rows, where n = number of
diagonal elements. The operator returns the matrix handle
VectorIDVectorIDVectorIDVectorIDVectorIDvectorID of the matrix VectorVectorVectorVectorVectorvector. Access to the
elements of the matrix is possible e.g. with the operator
get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix.
If DiagonalDiagonalDiagonalDiagonalDiagonaldiagonal = 0, the output of the VectorVectorVectorVectorVectorvector is the
main diagonal of the MatrixMatrixMatrixMatrixMatrixmatrix.
Example:
If DiagonalDiagonalDiagonalDiagonalDiagonaldiagonal is positive, the output VectorVectorVectorVectorVectorvector is the
DiagonalDiagonalDiagonalDiagonalDiagonaldiagonal-th super-diagonal of the MatrixMatrixMatrixMatrixMatrixmatrix.
Example:
If DiagonalDiagonalDiagonalDiagonalDiagonaldiagonal is negative, the DiagonalDiagonalDiagonalDiagonalDiagonaldiagonal-th
sub-diagonal of the MatrixMatrixMatrixMatrixMatrixmatrix is copied.
Example:
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Matrix handle of the input matrix.
Number of the desired diagonal.
Default value: 0
Suggested values: -20, -10, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20
Matrix handle containing the diagonal elements.
If the parameters are valid, the operator
get_diagonal_matrixget_diagonal_matrixGetDiagonalMatrixget_diagonal_matrixGetDiagonalMatrixGetDiagonalMatrix returns the value 2 (H_MSG_TRUE). If necessary,
an exception is raised.
create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix
get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix,
get_value_matrixget_value_matrixGetValueMatrixget_value_matrixGetValueMatrixGetValueMatrix
set_diagonal_matrixset_diagonal_matrixSetDiagonalMatrixset_diagonal_matrixSetDiagonalMatrixSetDiagonalMatrix
Foundation