ClassesClassesClassesClasses | | | | Operators

set_sub_matrixset_sub_matrixSetSubMatrixset_sub_matrixSetSubMatrixSetSubMatrix (Operator)

Name

set_sub_matrixset_sub_matrixSetSubMatrixset_sub_matrixSetSubMatrixSetSubMatrix — Set a sub-matrix of a matrix.

Signature

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

Herror set_sub_matrix(const Hlong MatrixID, const Hlong MatrixSubID, const Hlong Row, const Hlong Column)

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

Herror set_sub_matrix(const HTuple& MatrixID, const HTuple& MatrixSubID, const HTuple& Row, const HTuple& Column)

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

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

void HOperatorSetX.SetSubMatrix(
[in] VARIANT MatrixID, [in] VARIANT MatrixSubID, [in] VARIANT Row, [in] VARIANT Column)

void HMatrixX.SetSubMatrix(
[in] IHMatrixX* MatrixSubID, [in] Hlong Row, [in] Hlong Column)

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

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

Description

The operator set_sub_matrixset_sub_matrixSetSubMatrixset_sub_matrixSetSubMatrixSetSubMatrix overwrites a part of the MatrixMatrixMatrixMatrixMatrixmatrix with the matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub. The input matrices are defined by the matrix handles MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID and MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubID. The parameters RowRowRowRowRowrow and ColumnColumnColumnColumnColumncolumn determine the position of the upper left corner of the sub-matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in MatrixMatrixMatrixMatrixMatrixmatrix.

Example:


           /  3.0  0.0  9.0  1.0  \                 /  1.0  -2.0  \
  Matrix = | -5.0  3.0  1.0  6.0  |     MatrixSub = |  7.0   2.0  |
           \ -9.0  0.0  1.0 -1.0  /                 \ -4.0   1.0  /

  Row = 0   Column = 1

                /  3.0   1.0  -2.0   1.0  \
  ->   Matrix = | -5.0   7.0   2.0   6.0  |
                \ -9.0  -4.0   1.0  -1.0  /

Attention

set_sub_matrixset_sub_matrixSetSubMatrixset_sub_matrixSetSubMatrixSetSubMatrix modifies the content of an already existing matrix.

The conditions 0 <= RowRowRowRowRowrow < size of matrix MatrixMatrixMatrixMatrixMatrixmatrix in the row direction, RowRowRowRowRowrow + size of matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in the row direction <= size of matrix MatrixMatrixMatrixMatrixMatrixmatrix in the row direction, 0 <= ColumnColumnColumnColumnColumncolumn < size of MatrixMatrixMatrixMatrixMatrixmatrix in the column direction, and ColumnColumnColumnColumnColumncolumn + size of matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in the columns direction <= size of MatrixMatrixMatrixMatrixMatrixmatrix in the column direction must be satisfied.

Parallelization

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Matrix handle of the input matrix.

MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubID (input_control)  matrix HMatrix, HTupleHTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Matrix handle of the input sub-matrix.

RowRowRowRowRowrow (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

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

Default value: 0

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriction: Row >= 0

ColumnColumnColumnColumnColumncolumn (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

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

Default value: 0

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriction: Column >= 0

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix, get_value_matrixget_value_matrixGetValueMatrixget_value_matrixGetValueMatrixGetValueMatrix

See also

get_sub_matrixget_sub_matrixGetSubMatrixget_sub_matrixGetSubMatrixGetSubMatrix

Module

Foundation


ClassesClassesClassesClasses | | | | Operators