Skip to content

mult_element_matrix_modMultElementMatrixModMultElementMatrixModmult_element_matrix_modT_mult_element_matrix_mod🔗

説明🔗

mult_element_matrix_modMultElementMatrixModMultElementMatrixModmult_element_matrix_modT_mult_element_matrix_mod — 行列の要素ごとに積を計算する。

書式🔗

mult_element_matrix_mod( matrix MatrixAID, matrix MatrixBID )void MultElementMatrixMod( const HTuple& MatrixAID, const HTuple& MatrixBID )static void HOperatorSet.MultElementMatrixMod( HTuple matrixAID, HTuple matrixBID )def mult_element_matrix_mod( matrix_aid: HHandle, matrix_bid: HHandle ) -> None

Herror T_mult_element_matrix_mod( const Htuple MatrixAID, const Htuple MatrixBID )

void HMatrix::MultElementMatrixMod( const HMatrix& MatrixBID ) const

void HMatrix.MultElementMatrixMod( HMatrix matrixBID )

説明🔗

オペレーター mult_element_matrix_modMultElementMatrixMod は、2 つの行列 MatrixA と MatrixB を要素ごとに乗算します。 行列は、行列ハンドル MatrixAIDmatrixAIDmatrix_aid と MatrixBIDmatrixBIDmatrix_bid によ り定義されます。2 つの入力行列は同じ次元でなければなりません。入力 行列 MatrixA は、結果によって上書きされます。行列の要素 には、オペレーター get_full_matrixGetFullMatrix などを使用してアクセス できます。結果の計算式は以下の通りです。

\[\begin{eqnarray*} \texttt{MatrixA}_{ij} \quad = \quad \texttt{MatrixA}_{ij} \quad \cdot \quad \texttt{MatrixB}_{ij}. \end{eqnarray*}\]

例:

\[\begin{eqnarray*} \texttt{MatrixA} = \left[ \begin{array}{rrr} 4.0 & 8.0 & 0.0 \\ -6.0 & 7.0 & 2.0 \\ -9.0 & 4.0 & 1.0 \end{array} \right] \qquad \texttt{MatrixB} = \left[ \begin{array}{rrr} 2.0 & 8.0 & -3.0 \\ -4.0 & -1.0 & 4.0 \\ -2.0 & -4.0 & 2.0 \end{array} \right] \end{eqnarray*}\]
\[\begin{eqnarray*} \to \qquad \texttt{MatrixA} = \left[ \begin{array}{rrr} 8.0 & 64.0 & 0.0 \\ 24.0 & -7.0 & 8.0 \\ 18.0 & -16.0 & 2.0 \end{array} \right] \end{eqnarray*}\]

実行情報🔗

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

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

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

このオペレータは以下の入力パラメータの状態を変更します :

このパラメータの値は外部同期なしには複数スレッド間で共有されません。

パラメーター🔗

MatrixAIDmatrixAIDmatrix_aid (input_control, 状態が変更されました) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

入力行列 A の行列ハンドル

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

入力行列 B の行列ハンドル

結果🔗

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

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

組み合わせ

前処理の候補

create_matrixCreateMatrix

後処理の候補

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

他の選択候補

mult_element_matrixMultElementMatrix

関連項目

div_element_matrixDivElementMatrix, div_element_matrix_modDivElementMatrixMod, scale_matrixScaleMatrix, scale_matrix_modScaleMatrixMod

モジュール🔗

Foundation