commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1421263 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3: optim/nonlinear/scalar/noderiv/CMAESOptimizer.java optimization/direct/CMAESOptimizer.java
Date Thu, 13 Dec 2012 12:47:08 GMT
Author: erans
Date: Thu Dec 13 12:47:07 2012
New Revision: 1421263

URL: http://svn.apache.org/viewvc?rev=1421263&view=rev
Log:
Unused argument (found by PMD).

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/CMAESOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java?rev=1421263&r1=1421262&r2=1421263&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizer.java
Thu Dec 13 12:47:07 2012
@@ -431,7 +431,7 @@ public class CMAESOptimizer
             if (diagonalOnly <= 0) {
                 updateCovariance(hsig, bestArx, arz, arindex, xold);
             } else {
-                updateCovarianceDiagonalOnly(hsig, bestArz, xold);
+                updateCovarianceDiagonalOnly(hsig, bestArz);
             }
             // Adapt step size sigma - Eq. (5)
             sigma *= Math.exp(Math.min(1, (normps/chiN - 1) * cs / damps));
@@ -663,11 +663,9 @@ public class CMAESOptimizer
      * @param hsig Flag indicating a small correction.
      * @param bestArz Fitness-sorted matrix of the gaussian random values of the
      * current offspring.
-     * @param xold xmean matrix of the previous generation.
      */
     private void updateCovarianceDiagonalOnly(boolean hsig,
-                                              final RealMatrix bestArz,
-                                              final RealMatrix xold) {
+                                              final RealMatrix bestArz) {
         // minor correction if hsig==false
         double oldFac = hsig ? 0 : ccov1Sep * cc * (2 - cc);
         oldFac += 1 - ccov1Sep - ccovmuSep;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/CMAESOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/CMAESOptimizer.java?rev=1421263&r1=1421262&r2=1421263&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/CMAESOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/CMAESOptimizer.java
Thu Dec 13 12:47:07 2012
@@ -550,7 +550,7 @@ public class CMAESOptimizer
             if (diagonalOnly <= 0) {
                 updateCovariance(hsig, bestArx, arz, arindex, xold);
             } else {
-                updateCovarianceDiagonalOnly(hsig, bestArz, xold);
+                updateCovarianceDiagonalOnly(hsig, bestArz);
             }
             // Adapt step size sigma - Eq. (5)
             sigma *= Math.exp(Math.min(1, (normps/chiN - 1) * cs / damps));
@@ -790,11 +790,9 @@ public class CMAESOptimizer
      * @param hsig Flag indicating a small correction.
      * @param bestArz Fitness-sorted matrix of the gaussian random values of the
      * current offspring.
-     * @param xold xmean matrix of the previous generation.
      */
     private void updateCovarianceDiagonalOnly(boolean hsig,
-                                              final RealMatrix bestArz,
-                                              final RealMatrix xold) {
+                                              final RealMatrix bestArz) {
         // minor correction if hsig==false
         double oldFac = hsig ? 0 : ccov1Sep * cc * (2 - cc);
         oldFac += 1 - ccov1Sep - ccovmuSep;



Mime
View raw message