Skip to content

scale_matrixScaleMatrixScaleMatrixscale_matrixT_scale_matrix🔗

説明🔗

scale_matrixScaleMatrixScaleMatrixscale_matrixT_scale_matrix — 行列の大きさを変更する。

書式🔗

scale_matrix( matrix MatrixID, number Factor, out matrix MatrixScaledID )void ScaleMatrix( const HTuple& MatrixID, const HTuple& Factor, HTuple* MatrixScaledID )static void HOperatorSet.ScaleMatrix( HTuple matrixID, HTuple factor, out HTuple matrixScaledID )def scale_matrix( matrix_id: HHandle, factor: Union[int, float] ) -> HHandle

Herror T_scale_matrix( const Htuple MatrixID, const Htuple Factor, Htuple* MatrixScaledID )

HMatrix HMatrix::ScaleMatrix( const HTuple& Factor ) const

HMatrix HMatrix::ScaleMatrix( double Factor ) const

HMatrix HMatrix.ScaleMatrix( HTuple factor )

HMatrix HMatrix.ScaleMatrix( double factor )

説明🔗

オペレーター scale_matrixScaleMatrix は指定倍率で行列 Matrix の大きさを変更します。行列は行列ハンドル MatrixIDmatrixIDmatrix_id により定義されます。その結果、新しい行列 MatrixScaled が生成されます。オペレーターは行列ハンドル MatrixScaledIDmatrixScaledIDmatrix_scaled_id を返します。行列の要素には、オペレー ター get_full_matrixGetFullMatrix などを使用してアクセスできます。結果 の計算式は以下の通りです。

\[\begin{eqnarray*} \texttt{MatrixScaled}_{ij} \quad = \quad \textrm{Factor} \quad \cdot \quad \texttt{Matrix}_{ij}. \end{eqnarray*}\]

例:

Factorfactorfactor = 1.51.5

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & -2.0 \\ -2.0 & 6.0 & 2.0 \\ -5.0 & -4.0 & 1.0 \end{array} \right] \end{eqnarray*}\]
\[\begin{eqnarray*} \qquad \to \qquad \texttt{MatrixScaled} = \left[ \begin{array}{rrr} 4.5 & 1.5 & -3.0 \\ -3.0 & 9.0 & 3.0 \\ -7.5 & -6.0 & 1.5 \end{array} \right] \end{eqnarray*}\]

実行情報🔗

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

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

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

パラメーター🔗

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

入力行列の行列ハンドル

Factorfactorfactor (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

倍率

初期値: 2.02.0
推奨値: 0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.00.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.0

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

指定倍率を持つ要素の行列ハンドル

結果🔗

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

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

組み合わせ

前処理の候補

create_matrixCreateMatrix

後処理の候補

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

他の選択候補

scale_matrix_modScaleMatrixMod

関連項目

mult_element_matrixMultElementMatrix, mult_element_matrix_modMultElementMatrixMod, div_element_matrixDivElementMatrix, div_element_matrix_modDivElementMatrixMod

モジュール🔗

Foundation