Operator Reference

copy_matrixT_copy_matrixCopyMatrixCopyMatrixcopy_matrix (Operator)

copy_matrixT_copy_matrixCopyMatrixCopyMatrixcopy_matrix — Copy a matrix.

Signature

copy_matrix( : : MatrixID : MatrixCopyID)

Herror T_copy_matrix(const Htuple MatrixID, Htuple* MatrixCopyID)

void CopyMatrix(const HTuple& MatrixID, HTuple* MatrixCopyID)

HMatrix HMatrix::CopyMatrix() const

static void HOperatorSet.CopyMatrix(HTuple matrixID, out HTuple matrixCopyID)

HMatrix HMatrix.CopyMatrix()

def copy_matrix(matrix_id: HHandle) -> HHandle

Description

The operator copy_matrixcopy_matrixCopyMatrixCopyMatrixcopy_matrix creates the new matrix MatrixCopy and copies all elements of the input Matrix to this new matrix. The input Matrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The operator returns the matrix handle MatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyIDmatrix_copy_id of the matrix MatrixCopy. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix. With this operator a matrix can be saved before the matrix is modified by the operators set_value_matrixset_value_matrixSetValueMatrixSetValueMatrixset_value_matrix, set_full_matrixset_full_matrixSetFullMatrixSetFullMatrixset_full_matrix, set_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrixset_sub_matrix, or set_diagonal_matrixset_diagonal_matrixSetDiagonalMatrixSetDiagonalMatrixset_diagonal_matrix.

Example:

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

MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix.

MatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyIDmatrix_copy_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the copied matrix.

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixget_value_matrix

Alternatives

repeat_matrixrepeat_matrixRepeatMatrixRepeatMatrixrepeat_matrix

Module

Foundation