Commit b3f31e95 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'feature/transposed_plus_add' into 'master'

add operator+= to transposed view

See merge request amdis/amdis-core!29
parents e9eced48 4bc83a8c
......@@ -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;
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