Add sum and sum's unit test.

This commit is contained in:
Krad
2023-04-23 17:32:04 +08:00
parent 46be233087
commit c3462330c1
3 changed files with 69 additions and 1 deletions

View File

@@ -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);
};