max_matrixT_max_matrixMaxMatrixMaxMatrixmax_matrix (Operator)


max_matrixT_max_matrixMaxMatrixMaxMatrixmax_matrix — Returns the elementwise maximum of a 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


The operator 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. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix.

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


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.



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.



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


Execution Information


MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix.

MaxTypeMaxTypeMaxTypeMaxTypemaxTypemax_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of maximum determination.

Default value: 'columns' "columns" "columns" "columns" "columns" "columns"

List of values: 'columns'"columns""columns""columns""columns""columns", 'full'"full""full""full""full""full", 'rows'"rows""rows""rows""rows""rows"

MatrixMaxIDMatrixMaxIDMatrixMaxIDMatrixMaxIDmatrixMaxIDmatrix_max_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the maximum values of the input matrix.


If the parameters are valid, the operator max_matrixmax_matrixMaxMatrixMaxMatrixMaxMatrixmax_matrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors


Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

See also