diff --git a/Base/include/MatrixBase.h b/Base/include/MatrixBase.h index 94d8aa2..3cbbdf7 100644 --- a/Base/include/MatrixBase.h +++ b/Base/include/MatrixBase.h @@ -77,6 +77,16 @@ namespace FasTC { return ret; } + // Equality operator + template + bool operator==(MatrixBase<_T, nRows, nCols> &other) const { + bool result = true; + for(int i = 0; i < Size; i++) { + result = result && (mat[i] == other[i]); + } + return result; + } + // Matrix multiplication template MatrixBase MultiplyMatrix(const MatrixBase<_T, nCols, nTarget> &m) const {