max_matrixT_max_matrixMaxMatrixMaxMatrixmax_matrix (算子)

名称

max_matrixT_max_matrixMaxMatrixMaxMatrixmax_matrix — 返回矩阵的元素最大值。

签名

max_matrix( : : MatrixID, MaxType : MatrixMaxID)

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

void MaxMatrix(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)

static void HOperatorSet.MaxMatrix(HTuple matrixID, HTuple maxType, out HTuple matrixMaxID)

HMatrix HMatrix.MaxMatrix(string maxType)

def max_matrix(matrix_id: HHandle, max_type: str) -> HHandle

描述

算子 max_matrixmax_matrixMaxMatrixMaxMatrixMaxMatrixmax_matrix returns the maximum values of the elements of the Matrix defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. A new matrix MatrixMax is generated with the result and the matrix handle MatrixMaxIDMatrixMaxIDMatrixMaxIDMatrixMaxIDmatrixMaxIDmatrix_max_id of this matrix is returned.可通过算子 get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix 等方式访问该矩阵的元素。

The type of maximum determination of the matrix can be selected via the parameter MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type:

'columns'"columns""columns""columns""columns""columns"

The maximum is returned for each column of the Matrix separately. The resulting matrix MatrixMax has one row and the identical number of columns as the input matrix.

示例:

MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type = 'columns'"columns""columns""columns""columns""columns"

'rows'"rows""rows""rows""rows""rows"

The maximum is returned for each row of the Matrix separately. The resulting matrix MatrixMax has the identical number of rows as the input matrix and one column.

示例:

MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type = 'rows'"rows""rows""rows""rows""rows"

'full'"full""full""full""full""full"

The maximum is returned using all elements of the Matrix. The resulting matrix MatrixMax has one row and one column.

示例:

MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type = 'full'"full""full""full""full""full"

执行信息

参数

MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (输入控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

输入矩阵的矩阵句柄。

MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of maximum determination.

默认值: 'columns' "columns" "columns" "columns" "columns" "columns"

值列表: 'columns'"columns""columns""columns""columns""columns", 'full'"full""full""full""full""full", 'rows'"rows""rows""rows""rows""rows"

MatrixMaxIDMatrixMaxIDMatrixMaxIDMatrixMaxIDmatrixMaxIDmatrix_max_id (输出控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the maximum values of the input matrix.

结果

如果参数有效,算子 max_matrixmax_matrixMaxMatrixMaxMatrixMaxMatrixmax_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

可能的后继

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

另见

min_matrixmin_matrixMinMatrixMinMatrixMinMatrixmin_matrix

模块

基础