commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1243366 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/optimization/ main/java/org/apache/commons/math/optimization/direct/ main/java/org/apache/commons/math/optimization/general/ test/java/org/apache/commons/math/o...
Date Sun, 12 Feb 2012 23:38:25 GMT
Author: erans
Date: Sun Feb 12 23:38:24 2012
New Revision: 1243366

URL: http://svn.apache.org/viewvc?rev=1243366&view=rev
Log:
MATH-707
"SimpleScalarValueChecker" renamed to "SimpleValueChecker".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleValueChecker.java
      - copied, changed from r1243365, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/ConvergenceChecker.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateSimpleBoundsOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateMultiStartOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultivariateMultiStartOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/SimplexOptimizerMultiDirectionalTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/ConvergenceChecker.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/ConvergenceChecker.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/ConvergenceChecker.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/ConvergenceChecker.java
Sun Feb 12 23:38:24 2012
@@ -26,7 +26,7 @@ package org.apache.commons.math.optimiza
  *
  * @param <PAIR> Type of the (point, objective value) pair.
  *
- * @see org.apache.commons.math.optimization.SimpleScalarValueChecker
+ * @see org.apache.commons.math.optimization.SimpleValueChecker
  * @see org.apache.commons.math.optimization.SimplePointChecker<PointValuePair>
  *
  * @version $Id$

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleValueChecker.java
(from r1243365, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleValueChecker.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleValueChecker.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java&r1=1243365&r2=1243366&rev=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleValueChecker.java
Sun Feb 12 23:38:24 2012
@@ -31,12 +31,12 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 3.0
  */
-public class SimpleScalarValueChecker
+public class SimpleValueChecker
     extends AbstractConvergenceChecker<PointValuePair> {
     /**
      * Build an instance with default thresholds.
      */
-    public SimpleScalarValueChecker() {}
+    public SimpleValueChecker() {}
 
     /** Build an instance with specified thresholds.
      *
@@ -47,7 +47,7 @@ public class SimpleScalarValueChecker
      * @param relativeThreshold relative tolerance threshold
      * @param absoluteThreshold absolute tolerance threshold
      */
-    public SimpleScalarValueChecker(final double relativeThreshold,
+    public SimpleValueChecker(final double relativeThreshold,
                                     final double absoluteThreshold) {
         super(relativeThreshold, absoluteThreshold);
     }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -26,7 +26,7 @@ import org.apache.commons.math.optimizat
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 
 /**
  * Base class for implementing optimizers for multivariate scalar functions.
@@ -53,11 +53,11 @@ public abstract class BaseAbstractMultiv
 
     /**
      * Simple constructor with default settings.
-     * The convergence check is set to a {@link SimpleScalarValueChecker} and
+     * The convergence check is set to a {@link SimpleValueChecker} and
      * the allowed number of evaluations is set to {@link Integer#MAX_VALUE}.
      */
     protected BaseAbstractMultivariateOptimizer() {
-        this(new SimpleScalarValueChecker());
+        this(new SimpleValueChecker());
     }
     /**
      * @param checker Convergence checker.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateSimpleBoundsOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateSimpleBoundsOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateSimpleBoundsOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateSimpleBoundsOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -51,7 +51,7 @@ public abstract class BaseAbstractMultiv
     /**
      * Simple constructor with default settings.
      * The convergence checker is set to a
-     * {@link org.apache.commons.math.optimization.SimpleScalarValueChecker} and
+     * {@link org.apache.commons.math.optimization.SimpleValueChecker} and
      * the allowed number of evaluations is set to {@link Integer#MAX_VALUE}.
      *
      * @see BaseAbstractMultivariateOptimizer#BaseAbstractMultivariateOptimizer()

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -35,7 +35,7 @@ import org.apache.commons.math.optimizat
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 import org.apache.commons.math.random.MersenneTwister;
 import org.apache.commons.math.random.RandomGenerator;
 import org.apache.commons.math.util.MathArrays;
@@ -280,7 +280,7 @@ public class CMAESOptimizer
                           RandomGenerator random, boolean generateStatistics) {
         this(lambda, inputSigma, boundaries, maxIterations, stopFitness, isActiveCMA,
              diagonalOnly, checkFeasableCount, random, generateStatistics,
-             new SimpleScalarValueChecker());
+             new SimpleValueChecker());
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -24,7 +24,7 @@ import org.apache.commons.math.exception
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
 
 /**
@@ -90,11 +90,11 @@ public class SimplexOptimizer
     private AbstractSimplex simplex;
 
     /**
-     * Constructor using a default {@link SimpleScalarValueChecker convergence
+     * Constructor using a default {@link SimpleValueChecker convergence
      * checker}.
      */
     public SimplexOptimizer() {
-        this(new SimpleScalarValueChecker());
+        this(new SimpleValueChecker());
     }
 
     /**
@@ -109,7 +109,7 @@ public class SimplexOptimizer
      * @param abs Absolute threshold.
      */
     public SimplexOptimizer(double rel, double abs) {
-        this(new SimpleScalarValueChecker(rel, abs));
+        this(new SimpleValueChecker(rel, abs));
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -44,8 +44,8 @@ public abstract class AbstractScalarDiff
     /**
      * Simple constructor with default settings.
      * The convergence check is set to a
-     * {@link org.apache.commons.math.optimization.SimpleScalarValueChecker
-     * SimpleScalarValueChecker}.
+     * {@link org.apache.commons.math.optimization.SimpleValueChecker
+     * SimpleValueChecker}.
      */
     protected AbstractScalarDifferentiableOptimizer() {}
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
Sun Feb 12 23:38:24 2012
@@ -24,7 +24,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.util.FastMath;
 
@@ -54,7 +54,7 @@ public class NonLinearConjugateGradientO
     private double[] point;
 
     /**
-     * Constructor with default {@link SimpleScalarValueChecker checker},
+     * Constructor with default {@link SimpleValueChecker checker},
      * {@link BrentSolver line search solver} and
      * {@link IdentityPreconditioner preconditioner}.
      *
@@ -64,7 +64,7 @@ public class NonLinearConjugateGradientO
      */
     public NonLinearConjugateGradientOptimizer(final ConjugateGradientFormula updateFormula)
{
         this(updateFormula,
-             new SimpleScalarValueChecker());
+             new SimpleValueChecker());
     }
 
     /**

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateMultiStartOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateMultiStartOptimizerTest.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateMultiStartOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateMultiStartOptimizerTest.java
Sun Feb 12 23:38:24 2012
@@ -45,7 +45,7 @@ public class DifferentiableMultivariateM
         circle.addPoint( 45.0,  97.0);
         NonLinearConjugateGradientOptimizer underlying =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1.0e-10,
1.0e-10));
+                                                    new SimpleValueChecker(1.0e-10, 1.0e-10));
         JDKRandomGenerator g = new JDKRandomGenerator();
         g.setSeed(753289573253l);
         RandomVectorGenerator generator =

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultivariateMultiStartOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultivariateMultiStartOptimizerTest.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultivariateMultiStartOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultivariateMultiStartOptimizerTest.java
Sun Feb 12 23:38:24 2012
@@ -33,7 +33,7 @@ public class MultivariateMultiStartOptim
     public void testRosenbrock() {
         Rosenbrock rosenbrock = new Rosenbrock();
         SimplexOptimizer underlying
-            = new SimplexOptimizer(new SimpleScalarValueChecker(-1, 1.0e-3));
+            = new SimplexOptimizer(new SimpleValueChecker(-1, 1.0e-3));
         NelderMeadSimplex simplex = new NelderMeadSimplex(new double[][] {
                 { -1.2,  1.0 }, { 0.9, 1.2 } , {  3.5, -2.3 }
             });

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/SimplexOptimizerMultiDirectionalTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/SimplexOptimizerMultiDirectionalTest.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/SimplexOptimizerMultiDirectionalTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/SimplexOptimizerMultiDirectionalTest.java
Sun Feb 12 23:38:24 2012
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
 import org.apache.commons.math.analysis.MultivariateFunction;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 import org.apache.commons.math.util.FastMath;
 import org.junit.Assert;
 import org.junit.Test;
@@ -73,7 +73,7 @@ public class SimplexOptimizerMultiDirect
 
     @Test
     public void testMaximize2() {
-        SimplexOptimizer optimizer = new SimplexOptimizer(new SimpleScalarValueChecker(1e-15,
1e-30));
+        SimplexOptimizer optimizer = new SimplexOptimizer(new SimpleValueChecker(1e-15, 1e-30));
         optimizer.setSimplex(new MultiDirectionalSimplex(new double[] { 0.2, 0.2 }));
         final FourExtrema fourExtrema = new FourExtrema();
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java?rev=1243366&r1=1243365&r2=1243366&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java
Sun Feb 12 23:38:24 2012
@@ -27,7 +27,7 @@ import org.apache.commons.math.linear.Bl
 import org.apache.commons.math.linear.RealMatrix;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.PointValuePair;
-import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.SimpleValueChecker;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -100,7 +100,7 @@ public class NonLinearConjugateGradientO
             new LinearProblem(new double[][] { { 2 } }, new double[] { 3 });
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 0 });
         Assert.assertEquals(1.5, optimum.getPoint()[0], 1.0e-10);
@@ -115,7 +115,7 @@ public class NonLinearConjugateGradientO
 
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 0, 0 });
         Assert.assertEquals(7.0, optimum.getPoint()[0], 1.0e-10);
@@ -136,7 +136,7 @@ public class NonLinearConjugateGradientO
         }, new double[] { 0.0, 1.1, 2.2, 3.3, 4.4, 5.5 });
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 0, 0, 0, 0,
0, 0 });
         for (int i = 0; i < problem.target.length; ++i) {
@@ -153,7 +153,7 @@ public class NonLinearConjugateGradientO
         }, new double[] { 1, 1, 1});
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 0, 0, 0 });
         Assert.assertEquals(1.0, optimum.getPoint()[0], 1.0e-10);
@@ -190,7 +190,7 @@ public class NonLinearConjugateGradientO
 
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-13, 1e-13),
+                                                    new SimpleValueChecker(1e-13, 1e-13),
                                                     new BrentSolver(),
                                                     preconditioner);
                                                     
@@ -214,7 +214,7 @@ public class NonLinearConjugateGradientO
         }, new double[] { 1, 1, 1 });
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
                 optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 0, 0,
0 });
         Assert.assertTrue(optimum.getValue() > 0.5);
@@ -230,7 +230,7 @@ public class NonLinearConjugateGradientO
         }, new double[] { 32, 23, 33, 31 });
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-13, 1e-13),
+                                                    new SimpleValueChecker(1e-13, 1e-13),
                                                     new BrentSolver(1e-15, 1e-15));
         PointValuePair optimum1 =
             optimizer.optimize(200, problem1, GoalType.MINIMIZE, new double[] { 0, 1, 2,
3 });
@@ -264,7 +264,7 @@ public class NonLinearConjugateGradientO
 
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 7, 6, 5, 4
});
         Assert.assertEquals(0, optimum.getValue(), 1.0e-10);
@@ -282,7 +282,7 @@ public class NonLinearConjugateGradientO
         }, new double[] { 3.0, 12.0, -1.0, 7.0, 1.0 });
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 2, 2, 2, 2,
2, 2 });
         Assert.assertEquals(0, optimum.getValue(), 1.0e-10);
@@ -298,7 +298,7 @@ public class NonLinearConjugateGradientO
 
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 1, 1 });
         Assert.assertEquals(2.0, optimum.getPoint()[0], 1.0e-8);
@@ -316,7 +316,7 @@ public class NonLinearConjugateGradientO
 
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-6, 1e-6));
+                                                    new SimpleValueChecker(1e-6, 1e-6));
         PointValuePair optimum =
             optimizer.optimize(100, problem, GoalType.MINIMIZE, new double[] { 1, 1 });
         Assert.assertTrue(optimum.getValue() > 0.1);
@@ -333,7 +333,7 @@ public class NonLinearConjugateGradientO
         circle.addPoint( 45.0,  97.0);
         NonLinearConjugateGradientOptimizer optimizer =
             new NonLinearConjugateGradientOptimizer(ConjugateGradientFormula.POLAK_RIBIERE,
-                                                    new SimpleScalarValueChecker(1e-30, 1e-30),
+                                                    new SimpleValueChecker(1e-30, 1e-30),
                                                     new BrentSolver(1e-15, 1e-13));
         PointValuePair optimum =
             optimizer.optimize(100, circle, GoalType.MINIMIZE, new double[] { 98.680, 47.345
});



Mime
View raw message