Skip to content
Snippets Groups Projects
Commit c912f78e authored by Tuomas Karna's avatar Tuomas Karna
Browse files

fullMatrix::resize also uses setAll(0.) instead of scale(0.)

parent 15bd96b9
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ class fullVector
{
return _data[i];
}
inline scalar norm()
inline scalar norm() const
{
scalar n = 0.;
for(int i = 0; i < _r; ++i) n += _data[i] * _data[i];
......@@ -142,7 +142,7 @@ class fullMatrix
#endif
(*this)(r, c) = v;
}
inline scalar norm()
inline scalar norm() const
{
scalar n = 0.;
for(int i = 0; i < _r; ++i)
......@@ -192,7 +192,7 @@ class fullMatrix
_data = new scalar[_r * _c];
_own_data = true;
if(resetValue)
scale(0.);
setAll(0.);
return true;
}
else{
......@@ -200,7 +200,7 @@ class fullMatrix
_c = c;
}
if(resetValue)
scale(0.);
setAll(0.);
return false; // no reallocation
}
void setAsProxy(const fullMatrix<scalar> &original)
......
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