Skip to content

max_matrixMaxMatrixMaxMatrixmax_matrixT_max_matrix🔗

説明🔗

max_matrixMaxMatrixMaxMatrixmax_matrixT_max_matrix — 行列の要素単位の最大を返す。

書式🔗

max_matrix( matrix MatrixID, string MaxType, out matrix MatrixMaxID )void MaxMatrix( const HTuple& MatrixID, const HTuple& MaxType, HTuple* MatrixMaxID )static void HOperatorSet.MaxMatrix( HTuple matrixID, HTuple maxType, out HTuple matrixMaxID )def max_matrix( matrix_id: HHandle, max_type: str ) -> HHandle

Herror T_max_matrix( const Htuple MatrixID, const Htuple MaxType, Htuple* MatrixMaxID )

HMatrix HMatrix::MaxMatrix( const HString& MaxType ) const

HMatrix HMatrix::MaxMatrix( const char* MaxType ) const

HMatrix HMatrix::MaxMatrix( const wchar_t* MaxType ) const (Windows only)

HMatrix HMatrix.MaxMatrix( string maxType )

説明🔗

オペレーター max_matrixMaxMatrix は行列ハンドル MatrixIDmatrixIDmatrix_id で定義された行列 Matrix の要素の最大値を返します。新しい 行列 MatrixMax が結果とともに生成され、この行列の行列ハ ンドル MatrixMaxIDmatrixMaxIDmatrix_max_id が返されます。行列の要素には、オペレー ター get_full_matrixGetFullMatrix などを使用してアクセスできます。

行列の計算方法の指定をパラメーター MaxTypemaxTypemax_type を通じて選択す ることができます。

  • 'columns'"columns": 行列 Matrix の各列ごとの最 大値が返されます。結果行列 MatrixMax は 1 つの行と入力 行列と同数の列を持ちます。

    例:

    MaxTypemaxTypemax_type = 'columns'"columns"

    \[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 8.0 & 4.0 & -3.0 \\ -6.0 & 2.0 & 7.0 \end{array} \right] \end{eqnarray*}\]
    \[\begin{eqnarray*} \to \qquad \texttt{MatrixMax} = \left[ \begin{array}{rrr} 8.0 & 4.0 & 7.0 \\ \end{array} \right] \end{eqnarray*}\]
  • 'rows'"rows": 行列 Matrix の各行ごとの最大値 が返されます。結果行列 MatrixMax は入力行列と同数の行 と 1 つの列を持ちます。

    例:

    MaxTypemaxTypemax_type = 'rows'"rows"

    \[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 8.0 & 4.0 & -3.0 \\ -6.0 & 2.0 & 7.0 \end{array} \right] \end{eqnarray*}\]
    \[\begin{eqnarray*} \to \qquad \texttt{MatrixMax} = \left[ \begin{array}{r} 8.0 \\ 7.0 \end{array} \right] \end{eqnarray*}\]
  • 'full'"full": Matrix の全要素の最大値が返さ れます。結果行列 MatrixMax は 1 つの行と 1 つの列を持 ちます。

    例:

    MaxTypemaxTypemax_type = 'full'"full"

    \[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 8.0 & 4.0 & -3.0 \\ -6.0 & 2.0 & 7.0 \end{array} \right] \end{eqnarray*}\]
    \[\begin{eqnarray*} \to \qquad \texttt{MatrixMax} = \left[ \begin{array}{r} 8.0 \\ \end{array} \right] \end{eqnarray*}\]

実行情報🔗

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

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

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

パラメーター🔗

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

入力行列の行列ハンドル

MaxTypemaxTypemax_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

計算方法の指定

初期値: 'columns'"columns"
値のリスト: 'columns', 'full', 'rows'"columns", "full", "rows"

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

入力行列の最大値を持つ行列ハンドル

結果🔗

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

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

組み合わせ

前処理の候補

create_matrixCreateMatrix

後処理の候補

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

関連項目

min_matrixMinMatrix

モジュール🔗

Foundation