Parent class's method "getCovariances()" assumes that the protected
field "point" contains the result of the optimization.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1423555 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2012-12-18 18:02:52 +00:00
parent f36deaccf2
commit 0be09792a0
1 changed files with 6 additions and 0 deletions

View File

@ -374,6 +374,8 @@ public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer {
if (maxCosine <= orthoTolerance) { if (maxCosine <= orthoTolerance) {
// Convergence has been reached. // Convergence has been reached.
setCost(currentCost); setCost(currentCost);
// Update (deprecated) "point" field.
point = current.getPoint();
return current; return current;
} }
@ -482,6 +484,8 @@ public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer {
// we use the vectorial convergence checker // we use the vectorial convergence checker
if (checker.converged(iter, previous, current)) { if (checker.converged(iter, previous, current)) {
setCost(currentCost); setCost(currentCost);
// Update (deprecated) "point" field.
point = current.getPoint();
return current; return current;
} }
} }
@ -508,6 +512,8 @@ public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer {
ratio <= 2.0) || ratio <= 2.0) ||
delta <= parRelativeTolerance * xNorm) { delta <= parRelativeTolerance * xNorm) {
setCost(currentCost); setCost(currentCost);
// Update (deprecated) "point" field.
point = current.getPoint();
return current; return current;
} }