Commit 4bc83a8c authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

add operator+= to transposed view

parent 0215302f
...@@ -65,6 +65,18 @@ namespace AMDiS ...@@ -65,6 +65,18 @@ namespace AMDiS
return matrix_.N(); return matrix_.N();
} }
template <class Mat>
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: private:
Matrix& matrix_; Matrix& matrix_;
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment