Skip to content
Snippets Groups Projects
Commit b774fe43 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

implement in situ multiplication by a scalar

[[Imported from SVN: r7311]]
parent fae965fd
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,16 @@ class Tensor3
}
Tensor3<T,N1,N2,N3>& operator*=(const T& scalar)
{
for (int i=0; i<N1; i++)
for (int j=0; j<N2; j++)
for (int k=0; k<N3; k++)
(*this)[i][j][k] *= scalar;
return *this;
}
};
//! Output operator for array
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment