commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1423555 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java
Date Tue, 18 Dec 2012 18:02:53 GMT
Author: erans
Date: Tue Dec 18 18:02:52 2012
New Revision: 1423555

URL: http://svn.apache.org/viewvc?rev=1423555&view=rev
Log:
MATH-922
Parent class's method "getCovariances()" assumes that the protected
field "point" contains the result of the optimization.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java?rev=1423555&r1=1423554&r2=1423555&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java
Tue Dec 18 18:02:52 2012
@@ -374,6 +374,8 @@ public class LevenbergMarquardtOptimizer
             if (maxCosine <= orthoTolerance) {
                 // Convergence has been reached.
                 setCost(currentCost);
+                // Update (deprecated) "point" field.
+                point = current.getPoint();
                 return current;
             }
 
@@ -482,6 +484,8 @@ public class LevenbergMarquardtOptimizer
                         // we use the vectorial convergence checker
                         if (checker.converged(iter, previous, current)) {
                             setCost(currentCost);
+                            // Update (deprecated) "point" field.
+                            point = current.getPoint();
                             return current;
                         }
                     }
@@ -508,6 +512,8 @@ public class LevenbergMarquardtOptimizer
                      ratio <= 2.0) ||
                     delta <= parRelativeTolerance * xNorm) {
                     setCost(currentCost);
+                    // Update (deprecated) "point" field.
+                    point = current.getPoint();
                     return current;
                 }
 



Mime
View raw message