Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
4bc83a8c
Commit
4bc83a8c
authored
Mar 20, 2019
by
Praetorius, Simon
Browse files
add operator+= to transposed view
parent
0215302f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/amdis/common/Transposed.hpp
View file @
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
;
}
private:
Matrix
&
matrix_
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment