Skip to content
Snippets Groups Projects
Commit 71ab141a authored by Elias Pipping's avatar Elias Pipping Committed by pipping
Browse files

Use normSquared()

[[Imported from SVN: r11791]]
parent a7cf67bd
No related branches found
No related tags found
No related merge requests found
...@@ -19,10 +19,10 @@ class SumNorm: public Norm<VectorType> ...@@ -19,10 +19,10 @@ class SumNorm: public Norm<VectorType>
//! Compute the norm of the given vector //! Compute the norm of the given vector
double operator()(const VectorType &v) const double operator()(const VectorType &v) const
{ {
double r1 = norm1(v); double r1 = norm1.normSquared(v);
double r2 = norm2(v); double r2 = norm2.normSquared(v);
return std::sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2); return std::sqrt(alpha1 * r1 + alpha2 * r2);
} }
//! Compute the norm of the difference of two vectors //! Compute the norm of the difference of two vectors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment