Compare and negative for matrix

This commit is contained in:
Krad
2023-04-27 14:39:51 +08:00
parent e4e56b4a3e
commit 405963ad62
2 changed files with 184 additions and 0 deletions

View File

@@ -122,6 +122,10 @@ namespace Aurora {
Matrix operator-(Matrix &&matrix) const;
friend Matrix operator-(Matrix &&aMatrix,Matrix &aOther);
//negetive
friend Matrix operator-(Matrix &&aMatrix);
friend Matrix operator-(const Matrix &aMatrix);
// mul
Matrix operator*(double aScalar) const;
friend Matrix operator*(double aScalar, const Matrix &matrix);
@@ -144,6 +148,19 @@ namespace Aurora {
Matrix operator^(int times) const;
friend Matrix operator^(Matrix &&matrix,int times);
//compare
Matrix operator>(double aScalar) const;
friend Matrix operator>(double aScalar, const Matrix &matrix);
Matrix operator>(const Matrix &matrix) const;
Matrix operator<(double aScalar) const;
friend Matrix operator<(double aScalar, const Matrix &matrix);
Matrix operator<(const Matrix &matrix) const;
Matrix operator==(double aScalar) const;
friend Matrix operator==(double aScalar, const Matrix &matrix);
Matrix operator==(const Matrix &matrix) const;
/**
* print matrix , only support 2d matrix now
*/