copy_matrixT_copy_matrixCopyMatrixCopyMatrixcopy_matrix (算子)

名称

copy_matrixT_copy_matrixCopyMatrixCopyMatrixcopy_matrix — 复制矩阵。

签名

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

描述

算子 copy_matrixcopy_matrixCopyMatrixCopyMatrixCopyMatrixcopy_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 MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The operator returns the matrix handle MatrixCopyIDMatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyIDmatrix_copy_id of the matrix MatrixCopy.可通过算子 get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix 等方式访问该矩阵的元素。With this operator a matrix can be saved before the matrix is modified by the operators set_value_matrixset_value_matrixSetValueMatrixSetValueMatrixSetValueMatrixset_value_matrix, set_full_matrixset_full_matrixSetFullMatrixSetFullMatrixSetFullMatrixset_full_matrix, set_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrixSetSubMatrixset_sub_matrix, or set_diagonal_matrixset_diagonal_matrixSetDiagonalMatrixSetDiagonalMatrixSetDiagonalMatrixset_diagonal_matrix

示例:

执行信息

参数

MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (输入控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

输入矩阵的矩阵句柄。

MatrixCopyIDMatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyIDmatrix_copy_id (输出控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the copied matrix.

结果

如果参数有效,算子 copy_matrixcopy_matrixCopyMatrixCopyMatrixCopyMatrixcopy_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

可能的后继

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

替代

repeat_matrixrepeat_matrixRepeatMatrixRepeatMatrixRepeatMatrixrepeat_matrix

模块

基础