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

Trade brevity for clarity

[[Imported from SVN: r4607]]
parent 7c97633c
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
{ {
double r = 0.0; double r = 0.0;
for (int i = 0; i < dim*(dim+1)/2; ++i) for (int i = 0; i < dim*(dim+1)/2; ++i)
r += (1+(i>=dim))*(*this)[i]*B[i]; // this weird looking coefficient is used to produce the 2 as coefficient before the off-diagonal entries which occur twice in the full (symmetric) matrix r += (i>=dim ? 2 : 1)*(*this)[i]*B[i];
return r; return r;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment