set_sub_matrixT_set_sub_matrixSetSubMatrixSetSubMatrixset_sub_matrix (算子)

名称

set_sub_matrixT_set_sub_matrixSetSubMatrixSetSubMatrixset_sub_matrix — 设置矩阵的子矩阵。

签名

set_sub_matrix( : : MatrixID, MatrixSubID, Row, Column : )

Herror T_set_sub_matrix(const Htuple MatrixID, const Htuple MatrixSubID, const Htuple Row, const Htuple Column)

void SetSubMatrix(const HTuple& MatrixID, const HTuple& MatrixSubID, const HTuple& Row, const HTuple& Column)

void HMatrix::SetSubMatrix(const HMatrix& MatrixSubID, Hlong Row, Hlong Column) const

static void HOperatorSet.SetSubMatrix(HTuple matrixID, HTuple matrixSubID, HTuple row, HTuple column)

void HMatrix.SetSubMatrix(HMatrix matrixSubID, int row, int column)

def set_sub_matrix(matrix_id: HHandle, matrix_sub_id: HHandle, row: int, column: int) -> None

描述

算子 set_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrixSetSubMatrixset_sub_matrix overwrites a part of the Matrix with the matrix MatrixSub. The input matrices are defined by the matrix handles MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id and MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubIDmatrix_sub_id. The parameters RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn determine the position of the upper left corner of the sub-matrix MatrixSub in Matrix.

示例:

RowRowRowRowrowrow = 0, ColumnColumnColumnColumncolumncolumn = 1

注意

The conditions 0 RowRowRowRowrowrow < size of matrix Matrix in the row direction, RowRowRowRowrowrow + size of matrix MatrixSub in the row direction size of matrix Matrix in the row direction, 0 ColumnColumnColumnColumncolumncolumn < size of Matrix in the column direction, and ColumnColumnColumnColumncolumncolumn + size of matrix MatrixSub in the columns direction size of Matrix in the column direction must be satisfied.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (输入控制,状态被修改)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

输入矩阵的矩阵句柄。

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

Matrix handle of the input sub-matrix.

RowRowRowRowrowrow (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Upper row position of the sub-matrix in the matrix.

默认值: 0

建议值: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

限制: Row >= 0

ColumnColumnColumnColumncolumncolumn (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Left column position of the sub-matrix in the matrix.

默认值: 0

建议值: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

限制: Column >= 0

结果

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

可能的前趋

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

可能的后继

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

另见

get_sub_matrixget_sub_matrixGetSubMatrixGetSubMatrixGetSubMatrixget_sub_matrix

模块

基础