mean_matrix T_mean_matrix MeanMatrix MeanMatrix mean_matrix (Operator)
Name
mean_matrix T_mean_matrix MeanMatrix MeanMatrix mean_matrix
— Returns the elementwise mean of a matrix.
Signature
Description
The operator mean_matrix mean_matrix MeanMatrix MeanMatrix MeanMatrix mean_matrix
returns the mean values of the
elements of the Matrix
defined by the matrix handle
MatrixID MatrixID MatrixID MatrixID matrixID matrix_id
. A new matrix MatrixMean
is generated
with the result and the matrix handle MatrixMeanID MatrixMeanID MatrixMeanID MatrixMeanID matrixMeanID matrix_mean_id
of this
matrix is returned. Access to the elements of the matrix is
possible e.g., with the operator get_full_matrix get_full_matrix GetFullMatrix GetFullMatrix GetFullMatrix get_full_matrix
.
The type of mean determination of the matrix can be selected via the
parameter MeanType MeanType MeanType MeanType meanType mean_type
:
'columns' "columns" "columns" "columns" "columns" "columns" :
The mean is returned for
each column of the Matrix
separately. The resulting
matrix MatrixMean
has one row and the identical number
of columns as the input matrix.
Example:
MeanType MeanType MeanType MeanType meanType mean_type
= 'columns' "columns" "columns" "columns" "columns" "columns"
'rows' "rows" "rows" "rows" "rows" "rows" :
The mean is returned for each
row of the Matrix
separately. The resulting matrix
MatrixMean
has the identical number of rows as the input
matrix and one column.
Example:
MeanType MeanType MeanType MeanType meanType mean_type
= 'rows' "rows" "rows" "rows" "rows" "rows"
'full' "full" "full" "full" "full" "full" :
The mean is returned using all
elements of the Matrix
. The resulting matrix
MatrixMean
has one row and one column.
Example:
MeanType MeanType MeanType MeanType meanType mean_type
= 'full' "full" "full" "full" "full" "full"
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
MatrixID MatrixID MatrixID MatrixID matrixID matrix_id
(input_control) matrix →
HMatrix , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Matrix handle of the input matrix.
MeanType MeanType MeanType MeanType meanType mean_type
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Type of mean determination.
Default:
'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"
MatrixMeanID MatrixMeanID MatrixMeanID MatrixMeanID matrixMeanID matrix_mean_id
(output_control) matrix →
HMatrix , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Matrix handle with the mean values of the input
matrix.
Result
If the parameters are valid, the operator mean_matrix mean_matrix MeanMatrix MeanMatrix MeanMatrix mean_matrix
returns the value 2 (
H_MSG_TRUE )
. If necessary, an exception is raised.
Possible Predecessors
create_matrix create_matrix CreateMatrix CreateMatrix CreateMatrix create_matrix
Possible Successors
get_full_matrix get_full_matrix GetFullMatrix GetFullMatrix GetFullMatrix get_full_matrix
,
get_value_matrix get_value_matrix GetValueMatrix GetValueMatrix GetValueMatrix get_value_matrix
See also
norm_matrix norm_matrix NormMatrix NormMatrix NormMatrix norm_matrix
,
sum_matrix sum_matrix SumMatrix SumMatrix SumMatrix sum_matrix
Module
Foundation