Skip to content

copy_matrixCopyMatrixCopyMatrixcopy_matrixT_copy_matrix🔗

説明🔗

copy_matrixCopyMatrixCopyMatrixcopy_matrixT_copy_matrix — 行列をコピーする。

書式🔗

copy_matrix( matrix MatrixID, out matrix MatrixCopyID )void CopyMatrix( const HTuple& MatrixID, HTuple* MatrixCopyID )static void HOperatorSet.CopyMatrix( HTuple matrixID, out HTuple matrixCopyID )def copy_matrix( matrix_id: HHandle ) -> HHandle

Herror T_copy_matrix( const Htuple MatrixID, Htuple* MatrixCopyID )

HMatrix HMatrix::CopyMatrix( ) const

HMatrix HMatrix.CopyMatrix( )

説明🔗

オペレーター copy_matrixCopyMatrix は、新しい行列 MatrixCopy を生成し、入力行列 Matrix の全要素 をコピーします。入力 Matrix は、行列ハンド ル MatrixIDmatrixIDmatrix_id で定義されます。オペレーターは行列 MatrixCopy の行列ハンドル MatrixCopyIDmatrixCopyIDmatrix_copy_id を返しま す。行列の要素には、オペレーター get_full_matrixGetFullMatrix などを使 用してアクセスできます。 行列がオペレーター set_value_matrixSetValueMatrix、 set_full_matrixSetFullMatrix、set_sub_matrixSetSubMatrix、または set_diagonal_matrixSetDiagonalMatrix で修正される前に、オペレーター copy_matrixCopyMatrix を使用し、保存することができます。

例:

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & -2.0 \\ -5.0 & 7.0 & 2.0 \\ -9.0 & -4.0 & 1.0 \end{array} \right] \qquad \to \qquad \texttt{MatrixCopy} = \left[ \begin{array}{rrr} 3.0 & 1.0 & -2.0 \\ -5.0 & 7.0 & 2.0 \\ -9.0 & -4.0 & 1.0 \end{array} \right] \end{eqnarray*}\]

実行情報🔗

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

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

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

パラメーター🔗

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

入力行列の行列ハンドル

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

コピーされた行列の行列ハンドル

結果🔗

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

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

組み合わせ

前処理の候補

create_matrixCreateMatrix

後処理の候補

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

他の選択候補

repeat_matrixRepeatMatrix

モジュール🔗

Foundation