set_value_matrixSetValueMatrixSetValueMatrixset_value_matrixT_set_value_matrix
説明
set_value_matrixSetValueMatrixSetValueMatrixset_value_matrixT_set_value_matrix — 1 つ以上の行列要素を設定する。
書式
set_value_matrix( matrix MatrixID, integer Row, integer Column, number Value )void SetValueMatrix( const HTuple& MatrixID, const HTuple& Row, const HTuple& Column, const HTuple& Value )static void HOperatorSet.SetValueMatrix( HTuple matrixID, HTuple row, HTuple column, HTuple value )def set_value_matrix( matrix_id: HHandle, row: MaybeSequence[int], column: MaybeSequence[int], value: MaybeSequence[Union[int, float]] ) -> None
Herror T_set_value_matrix( const Htuple MatrixID, const Htuple Row, const Htuple Column, const Htuple Value )
void HMatrix::SetValueMatrix( const HTuple& Row, const HTuple& Column, const HTuple& Value ) const
void HMatrix::SetValueMatrix( Hlong Row, Hlong Column, double Value ) const
void HMatrix.SetValueMatrix( HTuple row, HTuple column, HTuple value )
void HMatrix.SetValueMatrix( int row, int column, double value )
説明
オペレーター set_value_matrixSetValueMatrix は、
Valuevaluevalue によって指定された値で、位置 (Rowrowrow,
Columncolumncolumn) に入力行列 Matrix の要素の値を設定します。
値は浮動小数点または整数の tuple です。整数が入力された場合は自動的に浮動小数
点に変換されます。
Valuevaluevalue 値の数は Rowrowrow と
Columncolumncolumn の要素数に等しくなければなりません。さらに、「0 \(\le\)
Rowrowrow \(<\) 行方向の行列 Matrix のサイズ」、「0
\(\le\) Columncolumncolumn \(<\) 列方向の行列 Matrix のサイズ」の各
条件を満たす必要があります。Matrix は、行列ハンドル
MatrixIDmatrixIDmatrix_id により定義されます。
例:
Rowrowrow = [0, 2, 1][0, 2, 1],
Columncolumncolumn = [1, 0, 3][1, 0, 3],
Valuevaluevalue = [1, -9, 6][1, -9, 6]
\[\begin{eqnarray*}
\texttt{Matrix} =
\left[ \begin{array}{rrrr}
3.0 & 0.0 & -2.0 & 1.0 \\
-5.0 & 7.0 & 2.0 & -2.0 \\
8.0 & -4.0 & 1.0 & -1.0
\end{array} \right]
\end{eqnarray*}\]
\[\begin{eqnarray*}
\to \quad \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*}\]
実行情報
実行情報
このオペレータは以下の入力パラメータの状態を変更します :
このパラメータの値は外部同期なしには複数スレッド間で共有されません。
パラメーター
MatrixIDmatrixIDmatrix_id (input_control, 状態が変更されました) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
入力行列の行列ハンドル
Rowrowrow (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (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(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (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
Valuevaluevalue (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
指示された行列要素内で設定する値
初期値: 00
推奨値: 0, 1, -10, 1, -1
結果
パラメーターが有効ならば、オペレーター set_value_matrixSetValueMatrix は
値 2 (H_MSG_TRUE) を返します。必要に応じて、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
create_matrixCreateMatrix
後処理の候補
clear_matrixClearMatrix
関連項目
get_value_matrixGetValueMatrix
モジュール
Foundation