get_sub_matrixT_get_sub_matrixGetSubMatrixGetSubMatrixget_sub_matrix (Operator)

Name

get_sub_matrixT_get_sub_matrixGetSubMatrixGetSubMatrixget_sub_matrix — Gibt einen Teil einer Matrix zurück.

Signatur

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

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

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

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)

def get_sub_matrix(matrix_id: HHandle, row: int, column: int, rows_sub: int, columns_sub: int) -> HHandle

Beschreibung

Der Operator get_sub_matrixget_sub_matrixGetSubMatrixGetSubMatrixGetSubMatrixget_sub_matrix generiert eine neue Matrix MatrixSub und kopiert in diese einen Teil der Eingabematrix Matrix, die durch das Matrix Handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id gegeben ist. Der Teil der Matrix Matrix wird durch die obere linke Ecke (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) und die Dimension der Teilmatrix (RowsSubRowsSubRowsSubRowsSubrowsSubrows_sub,ColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSubcolumns_sub) festgelegt. Der Operator gibt das Matrix Handle MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubIDmatrix_sub_id der Matrix MatrixSub zurück. Zugriff auf die Elemente der Matrix ist z.B. mit dem Operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix möglich.

Beispiel:

RowRowRowRowrowrow = 0, ColumnColumnColumnColumncolumncolumn = 1, RowsSubRowsSubRowsSubRowsSubrowsSubrows_sub = 3, ColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSubcolumns_sub = 2

Achtung

Es müssen die Bedingungen 0 RowRowRowRowrowrow < Größe der Matrix Matrix in Zeilenrichtung, RowRowRowRowrowrow + RowsSubRowsSubRowsSubRowsSubrowsSubrows_sub Größe der Matrix Matrix in Zeilenrichtung, 0 ColumnColumnColumnColumncolumncolumn < Größe der Matrix Matrix in Spaltenrichtung und ColumnColumnColumnColumncolumncolumn + ColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSubcolumns_sub Größe der Matrix Matrix in Spaltenrichtung erfüllt sein.

Ausführungsinformationen

Parameter

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

Matrix Handle der Eingabematrix.

RowRowRowRowrowrow (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Obere Zeilenposition der Teilmatrix in der Eingabematrix.

Defaultwert: 0

Wertevorschläge: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriktion: Row >= 0

ColumnColumnColumnColumncolumncolumn (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Linke Spaltenposition der Teilmatrix in der Eingabematrix.

Defaultwert: 0

Wertevorschläge: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriktion: Column >= 0

RowsSubRowsSubRowsSubRowsSubrowsSubrows_sub (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Anzahl der Zeilen der Teilmatrix.

Defaultwert: 1

Wertevorschläge: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriktion: RowsSub >= 1

ColumnsSubColumnsSubColumnsSubColumnsSubcolumnsSubcolumns_sub (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Anzahl der Spalten der Teilmatrix.

Defaultwert: 1

Wertevorschläge: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriktion: ColumnsSub >= 1

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

Matrix Handle der Teilmatrix.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert get_sub_matrixget_sub_matrixGetSubMatrixGetSubMatrixGetSubMatrixget_sub_matrix den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

Nachfolger

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

Siehe auch

set_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrixSetSubMatrixset_sub_matrix

Modul

Foundation