ClassesClasses | | Operators

max_matrixmax_matrixMaxMatrixMaxMatrix (Operator)

Name

max_matrixmax_matrixMaxMatrixMaxMatrix — Returns the elementwise maximum of a matrix.

Signature

max_matrix( : : MatrixID, MaxType : MatrixMaxID)

Herror max_matrix(const Hlong MatrixID, const char* MaxType, Hlong* 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

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

HMatrix HMatrix.MaxMatrix(string maxType)

Description

The operator max_matrixmax_matrixMaxMatrixMaxMatrixMaxMatrix returns the maximum values of the elements of the MatrixMatrixMatrixMatrixmatrix defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID. A new matrix MatrixMaxMatrixMaxMatrixMaxMatrixMaxmatrixMax is generated with the result and the matrix handle MatrixMaxIDMatrixMaxIDMatrixMaxIDMatrixMaxIDmatrixMaxID of this matrix is returned. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix.

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

'columns'"columns""columns""columns""columns":

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

Example:

'rows'"rows""rows""rows""rows":

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

Example:

'full'"full""full""full""full":

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

Example:

Execution Information

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Matrix handle of the input matrix.

MaxTypeMaxTypeMaxTypeMaxTypemaxType (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Type of maximum determination.

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

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

MatrixMaxIDMatrixMaxIDMatrixMaxIDMatrixMaxIDmatrixMaxID (output_control)  matrix HMatrix, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Matrix handle with the maximum values of the input matrix.

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrix

See also

min_matrixmin_matrixMinMatrixMinMatrixMinMatrix

Module

Foundation


ClassesClasses | | Operators