Skip to content
Snippets Groups Projects
Commit 4bc83a8c authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

add operator+= to transposed view

parent 0215302f
No related branches found
No related tags found
1 merge request!29add operator+= to transposed view
......@@ -65,6 +65,18 @@ namespace AMDiS
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:
Matrix& matrix_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment