diff options
author | Thomas Capricelli <orzel@freehackers.org> | 2009-08-24 17:49:37 +0200 |
---|---|---|
committer | Thomas Capricelli <orzel@freehackers.org> | 2009-08-24 17:49:37 +0200 |
commit | 4e62e2986929a2e10b289015453c4e393d8d84b9 (patch) | |
tree | 39267b8209843ed66af357f7bff17c99675046dd /unsupported/Eigen/src/NonLinear/covar.h | |
parent | 17905c73996aa0a4a3e5146457af29eb827c7422 (diff) |
cleaning covar
Diffstat (limited to 'unsupported/Eigen/src/NonLinear/covar.h')
-rw-r--r-- | unsupported/Eigen/src/NonLinear/covar.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/unsupported/Eigen/src/NonLinear/covar.h b/unsupported/Eigen/src/NonLinear/covar.h index 3c163dd68..2e495cd7f 100644 --- a/unsupported/Eigen/src/NonLinear/covar.h +++ b/unsupported/Eigen/src/NonLinear/covar.h @@ -25,9 +25,8 @@ void ei_covar( for (j = 0; j <= k-1; ++j) { temp = r(k,k) * r(j,k); r(j,k) = 0.; - for (i = 0; i <= j; ++i) { + for (i = 0; i <= j; ++i) r(i,k) -= temp * r(i,j); - } } l = k; } @@ -50,12 +49,12 @@ void ei_covar( /* in the strict lower triangle of r and in wa. */ for (j = 0; j < n; ++j) { - jj = ipvt[j]-1; + jj = ipvt[j]; sing = j > l; for (i = 0; i <= j; ++i) { if (sing) r(i,j) = 0.; - ii = ipvt[i]-1; + ii = ipvt[i]; if (ii > jj) r(ii,jj) = r(i,j); if (ii < jj) |