commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1185917 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java
Date Tue, 18 Oct 2011 23:12:14 GMT
Author: erans
Date: Tue Oct 18 23:12:14 2011
New Revision: 1185917

URL: http://svn.apache.org/viewvc?rev=1185917&view=rev
Log:
MATH-621
Reordering of operations leads to unit tests failures.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java?rev=1185917&r1=1185916&r2=1185917&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java
Tue Oct 18 23:12:14 2011
@@ -723,7 +723,11 @@ public class BOBYQAOptimizer
                 bsum += sum * d__.getEntry(j);
                 dx += d__.getEntry(j) * xopt.getEntry(j);
             }
-            beta = dx * dx + dsq * (xoptsq + dx + dx + HALF * dsq) + beta - bsum;
+
+            beta = dx * dx + dsq * (xoptsq + dx + dx + HALF * dsq) + beta - bsum; // Original
+            // beta += dx * dx + dsq * (xoptsq + dx + dx + HALF * dsq) - bsum; // XXX "testAckley"
and "testDiffPow" fail.
+            // beta = dx * dx + dsq * (xoptsq + 2 * dx + HALF * dsq) + beta - bsum; // XXX
"testDiffPow" fails.
+
             vlag.setEntry(trustRegionCenterInterpolationPointIndex,
                           vlag.getEntry(trustRegionCenterInterpolationPointIndex) + ONE);
 



Mime
View raw message