diff --git a/src/amdis/common/Transposed.hpp b/src/amdis/common/Transposed.hpp index 38920b9665f73ce240b180505a604bb68bc63f1b..f99011ce7af75f44cbec31b2ea056624a9f97938 100644 --- a/src/amdis/common/Transposed.hpp +++ b/src/amdis/common/Transposed.hpp @@ -65,6 +65,18 @@ namespace AMDiS return matrix_.N(); } + template + TransposedMatrix& operator+=(Mat const& mat) + { + assert(mat.N() == N()); + assert(mat.M() == M()); + for (size_type i = 0; i < N(); ++i) + for (size_type j = 0; j < M(); ++j) + (*this)[i][j] += mat[i][j]; + + return *this; + } + private: Matrix& matrix_; };