Add Matrix mul operator const define.

This commit is contained in:
sunwen
2023-05-16 11:11:02 +08:00
parent 6106cc9a5a
commit 21030b554c
2 changed files with 3 additions and 3 deletions

View File

@@ -838,7 +838,7 @@ namespace Aurora {
return Matrix::New(newBuffer,aMatrix); return Matrix::New(newBuffer,aMatrix);
} }
Matrix Matrix::mul(const Matrix& aOther){ Matrix Matrix::mul(const Matrix& aOther) const {
if (isNull() || aOther.isNull()){ if (isNull() || aOther.isNull()){
std::cerr<<"Mul operation fail, Matrix is null!"<<std::endl; std::cerr<<"Mul operation fail, Matrix is null!"<<std::endl;
return Matrix(); return Matrix();

View File

@@ -179,7 +179,7 @@ namespace Aurora {
* @param aOther * @param aOther
* @return Matrix * @return Matrix
*/ */
Matrix mul(const Matrix& aOther); Matrix mul(const Matrix& aOther) const;
/** /**
* 矩阵乘法 * 矩阵乘法
@@ -187,7 +187,7 @@ namespace Aurora {
* @param aOther * @param aOther
* @return Matrix * @return Matrix
*/ */
Matrix mul(Matrix&& aOther); Matrix mul(Matrix&& aOther) const;
/** /**
* print matrix , only support 2d matrix now * print matrix , only support 2d matrix now