diff options
author | Thomas Capricelli <orzel@freehackers.org> | 2011-08-04 05:02:04 +0200 |
---|---|---|
committer | Thomas Capricelli <orzel@freehackers.org> | 2011-08-04 05:02:04 +0200 |
commit | a660e6425c5e90c5be852b5dc08bfd351944b72a (patch) | |
tree | cd27c853064090601352f772bed59af0f4479af8 /unsupported/Eigen/src/NonLinearOptimization | |
parent | 5748d3c96f78f80cea3f3a4d04d2535ed2567f15 (diff) |
fix a bug where some rotations were not initialized
They actually were in the original minpack code, this is a bug introduced
by our migration.
Reported on #322 and
http://forum.kde.org/viewtopic.php?f=74&t=96197#p201158
Diffstat (limited to 'unsupported/Eigen/src/NonLinearOptimization')
-rw-r--r-- | unsupported/Eigen/src/NonLinearOptimization/r1updt.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/NonLinearOptimization/r1updt.h b/unsupported/Eigen/src/NonLinearOptimization/r1updt.h index 0b8ede119..528f8eef9 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/r1updt.h +++ b/unsupported/Eigen/src/NonLinearOptimization/r1updt.h @@ -11,6 +11,7 @@ void r1updt( bool *sing) { typedef DenseIndex Index; + const JacobiRotation<Scalar> IdentityRotation = JacobiRotation<Scalar>(1,0); /* Local variables */ const Index m = s.rows(); @@ -49,7 +50,8 @@ void r1updt( w[i] = givens.s() * s(j,i) + givens.c() * w[i]; s(j,i) = temp; } - } + } else + v_givens[j] = IdentityRotation; } /* add the spike from the rank 1 update to w. */ @@ -73,7 +75,8 @@ void r1updt( /* store the information necessary to recover the */ /* givens rotation. */ w_givens[j] = givens; - } + } else + v_givens[j] = IdentityRotation; /* test for zero diagonal elements in the output s. */ if (s(j,j) == 0.) { |