Add sum and sum's unit test.
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Aurora {
|
||||
* @return
|
||||
*/
|
||||
Matrix max(const Matrix& aMatrix,FunctionDirection direction = Column);
|
||||
|
||||
/**
|
||||
* 比较两个矩阵,求对应位置的最小值,不支持三维
|
||||
* @attention 矩阵形状不一样时,如A为[MxN],则B应为标量或[1xN]的行向量
|
||||
@@ -42,6 +43,14 @@ namespace Aurora {
|
||||
*/
|
||||
Matrix min(const Matrix& aMatrix,const Matrix& aOther);
|
||||
|
||||
/**
|
||||
* 求矩阵和,可按行、列、单元, 目前不支持三维,不支持复数
|
||||
* @param aMatrix 矩阵
|
||||
* @param direction 方向,Column, Row, All
|
||||
* @return
|
||||
*/
|
||||
Matrix sum(const Matrix& aMatrix,FunctionDirection direction = Column);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user