sum_matrix T_sum_matrix SumMatrix SumMatrix sum_matrix (算子)
名称
sum_matrix T_sum_matrix SumMatrix SumMatrix sum_matrix — 返回矩阵的元素总和。
签名
描述
算子 sum_matrix sum_matrix SumMatrix SumMatrix SumMatrix sum_matrix returns the sum of the elements of
the Matrix defined by the matrix handle MatrixID MatrixID MatrixID MatrixID matrixID matrix_id .
A new matrix MatrixSum is generated with the result and
the matrix handle MatrixSumID MatrixSumID MatrixSumID MatrixSumID matrixSumID matrix_sum_id of this matrix is returned.可通过算子
get_full_matrix get_full_matrix GetFullMatrix GetFullMatrix GetFullMatrix get_full_matrix 等方式访问该矩阵的元素。
The type of sum determination of the matrix can be selected via the
parameter SumType SumType SumType SumType sumType sum_type :
'columns' "columns" "columns" "columns" "columns" "columns" :
The sum is returned for
each column of the Matrix separately. The resulting
matrix MatrixSum has one row and the identical number of
columns as the input matrix.
示例:
SumType SumType SumType SumType sumType sum_type = 'columns' "columns" "columns" "columns" "columns" "columns"
'rows' "rows" "rows" "rows" "rows" "rows" :
The sum is returned for each
row of the Matrix separately. The resulting matrix
MatrixSum has the identical number of rows as the input
matrix and one column.
示例:
SumType SumType SumType SumType sumType sum_type = 'rows' "rows" "rows" "rows" "rows" "rows"
'full' "full" "full" "full" "full" "full" :
The sum is returned using all
elements of the Matrix. The resulting matrix
MatrixSum has one row and one column.
示例:
SumType SumType SumType SumType sumType sum_type = 'full' "full" "full" "full" "full" "full"
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
未采用并行化处理。
参数
MatrixID MatrixID MatrixID MatrixID matrixID matrix_id (输入控制) matrix → HMatrix , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
输入矩阵的矩阵句柄。
SumType SumType SumType SumType sumType sum_type (输入控制) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Type of summation.
默认值:
'columns'
"columns"
"columns"
"columns"
"columns"
"columns"
值列表:
'columns' "columns" "columns" "columns" "columns" "columns" , 'full' "full" "full" "full" "full" "full" , 'rows' "rows" "rows" "rows" "rows" "rows"
MatrixSumID MatrixSumID MatrixSumID MatrixSumID matrixSumID matrix_sum_id (输出控制) matrix → HMatrix , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Matrix handle with the sum of the input matrix.
结果
如果参数有效,算子 sum_matrix sum_matrix SumMatrix SumMatrix SumMatrix sum_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
create_matrix create_matrix CreateMatrix CreateMatrix CreateMatrix create_matrix
可能的后继
get_full_matrix get_full_matrix GetFullMatrix GetFullMatrix GetFullMatrix get_full_matrix ,
get_value_matrix get_value_matrix GetValueMatrix GetValueMatrix GetValueMatrix get_value_matrix
另见
norm_matrix norm_matrix NormMatrix NormMatrix NormMatrix norm_matrix
模块
基础