Skip to content

get_sub_matrixGetSubMatrixGetSubMatrixget_sub_matrixT_get_sub_matrix🔗

説明🔗

get_sub_matrixGetSubMatrixGetSubMatrixget_sub_matrixT_get_sub_matrix — 行列の小行列を取得する。

書式🔗

get_sub_matrix( matrix MatrixID, integer Row, integer Column, integer RowsSub, integer ColumnsSub, out matrix MatrixSubID )void GetSubMatrix( const HTuple& MatrixID, const HTuple& Row, const HTuple& Column, const HTuple& RowsSub, const HTuple& ColumnsSub, HTuple* MatrixSubID )static void HOperatorSet.GetSubMatrix( HTuple matrixID, HTuple row, HTuple column, HTuple rowsSub, HTuple columnsSub, out HTuple matrixSubID )def get_sub_matrix( matrix_id: HHandle, row: int, column: int, rows_sub: int, columns_sub: int ) -> HHandle

Herror T_get_sub_matrix( 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

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

説明🔗

オペレーター get_sub_matrixGetSubMatrix は新しい行列 MatrixSub を生成し、行列ハンドル MatrixIDmatrixIDmatrix_id によっ て定義された入力行列 Matrix の一部をこの行列にコピーしま す。 行列 Matrix の一部分は左上隅 (Rowrowrow,Columncolumncolumn ) と小行列次元 (RowsSubrowsSubrows_sub, ColumnsSubcolumnsSubcolumns_sub) によって定 義されます。オペレーターは行列 MatrixSub の行列ハンドル MatrixSubIDmatrixSubIDmatrix_sub_id を返します。行列の要素には、オペレーター get_full_matrixGetFullMatrix などを使用してアクセスできます。

例:

Rowrowrow = 00, Columncolumncolumn = 11, RowsSubrowsSubrows_sub = 33, ColumnsSubcolumnsSubcolumns_sub = 22

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrrr} 3.0 & 1.0 & -2.0 & 1.0 \\ -5.0 & 7.0 & 2.0 & 6.0 \\ -9.0 & -4.0 & 1.0 & -1.0 \end{array} \right] \end{eqnarray*}\]
\[\begin{eqnarray*} \to \quad \texttt{MatrixSub} = \left[ \begin{array}{rr} 1.0 & -2.0 \\ 7.0 & 2.0 \\ -4.0 & 1.0 \end{array} \right] \end{eqnarray*}\]

注意🔗

「0 \(\le\) Rowrowrow \(<\) 行方向の行列 Matrix のサイズ」、「Rowrowrow \(+\) RowsSubrowsSubrows_sub \(\le\) 行方 向の行列 Matrix のサイズ」、「0 \(\le\) Columncolumncolumn \(<\) 列方向の行列 Matrix のサイズ」、「 Columncolumncolumn \(+\) ColumnsSubcolumnsSubcolumns_sub \(\le\) 列方向の行 列 Matrix のサイズ」の各条件を満たす必要があります。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

MatrixIDmatrixIDmatrix_id (input_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

入力行列の行列ハンドル

Rowrowrow (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

入力行列での小行列の上段の行位置

初期値: 00
推奨値: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
制限: Row >= 0

Columncolumncolumn (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

入力行列での小行列の左の列位置

初期値: 00
推奨値: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
制限: Column >= 0

RowsSubrowsSubrows_sub (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

小行列の行数

初期値: 11
推奨値: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 1001, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
制限: RowsSub >= 1

ColumnsSubcolumnsSubcolumns_sub (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

小行列の列数

初期値: 11
推奨値: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 1001, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
制限: ColumnsSub >= 1

MatrixSubIDmatrixSubIDmatrix_sub_id (output_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

小行列の行列ハンドル

結果🔗

パラメーターが有効ならば、オペレーター get_sub_matrixGetSubMatrix は 値 2 (H_MSG_TRUE) を返します。必要に応じて、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

create_matrixCreateMatrix

後処理の候補

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

関連項目

set_sub_matrixSetSubMatrix

モジュール🔗

Foundation