Compare and negative for matrix
This commit is contained in:
17
src/Matrix.h
17
src/Matrix.h
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user