ClassesClassesClassesClasses | | | | Operators

get_sub_matrixget_sub_matrixGetSubMatrixget_sub_matrixGetSubMatrixGetSubMatrix (Operator)

Name

get_sub_matrixget_sub_matrixGetSubMatrixget_sub_matrixGetSubMatrixGetSubMatrix — Get a sub-matrix of a matrix.

Signature

get_sub_matrix( : : MatrixID, Row, Column, RowsSub, ColumnsSub : MatrixSubID)

Herror get_sub_matrix(const Hlong MatrixID, const Hlong Row, const Hlong Column, const Hlong RowsSub, const Hlong ColumnsSub, Hlong* MatrixSubID)

Herror T_get_sub_matrix(const Htuple MatrixID, const Htuple Row, const Htuple Column, const Htuple RowsSub, const Htuple ColumnsSub, Htuple* MatrixSubID)

Herror get_sub_matrix(const HTuple& MatrixID, const HTuple& Row, const HTuple& Column, const HTuple& RowsSub, const HTuple& ColumnsSub, Hlong* MatrixSubID)

HMatrix HMatrix::GetSubMatrix(const HTuple& Row, const HTuple& Column, const HTuple& RowsSub, const HTuple& ColumnsSub) const

void GetSubMatrix(const HTuple& MatrixID, const HTuple& Row, const HTuple& Column, const HTuple& RowsSub, const HTuple& ColumnsSub, HTuple* MatrixSubID)

HMatrix HMatrix::GetSubMatrix(Hlong Row, Hlong Column, Hlong RowsSub, Hlong ColumnsSub) const

void HOperatorSetX.GetSubMatrix(
[in] VARIANT MatrixID, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT RowsSub, [in] VARIANT ColumnsSub, [out] VARIANT* MatrixSubID)

IHMatrixX* HMatrixX.GetSubMatrix(
[in] Hlong Row, [in] Hlong Column, [in] Hlong RowsSub, [in] Hlong ColumnsSub)

static void HOperatorSet.GetSubMatrix(HTuple matrixID, HTuple row, HTuple column, HTuple rowsSub, HTuple columnsSub, out HTuple matrixSubID)

HMatrix HMatrix.GetSubMatrix(int row, int column, int rowsSub, int columnsSub)

Description

The operator get_sub_matrixget_sub_matrixGetSubMatrixget_sub_matrixGetSubMatrixGetSubMatrix generates a new matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub and copies to this matrix a part of the input MatrixMatrixMatrixMatrixMatrixmatrix defined by the matrix handle MatrixMatrixMatrixMatrixMatrixmatrix. The part of the MatrixMatrixMatrixMatrixMatrixmatrix is determined by the upper left corner (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) and the sub-matrix dimensions (RowsSubRowsSubRowsSubRowsSubRowsSubrowsSub, ColumnsSubColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSub). The operator returns the matrix handle MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubID of the matrix MatrixSubMatrixSubMatrixSubMatrixSubMatrixSubmatrixSub. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix.

Example:

Attention

The conditions 0 <= RowRowRowRowRowrow < size of MatrixMatrixMatrixMatrixMatrixmatrix in row direction, RowRowRowRowRowrow + RowsSubRowsSubRowsSubRowsSubRowsSubrowsSub <= size of MatrixMatrixMatrixMatrixMatrixmatrix in the row direction, 0 <= ColumnColumnColumnColumnColumncolumn < size of MatrixMatrixMatrixMatrixMatrixmatrix in the column direction, and ColumnColumnColumnColumnColumncolumn + ColumnsSubColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSub <= size of matrix 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.

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

Upper row position of the sub-matrix in the input 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 input 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

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

Number of rows of the sub-matrix.

Default value: 1

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

Restriction: RowsSub >= 1

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

Number of columns of the sub-matrix.

Default value: 1

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

Restriction: ColumnsSub >= 1

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

Matrix handle of the sub-matrix.

Result

If the parameters are valid, the operator get_sub_matrixget_sub_matrixGetSubMatrixget_sub_matrixGetSubMatrixGetSubMatrix 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

set_sub_matrixset_sub_matrixSetSubMatrixset_sub_matrixSetSubMatrixSetSubMatrix

Module

Foundation


ClassesClassesClassesClasses | | | | Operators