commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1244787 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math3/optimization/ main/java/org/apache/commons/math3/optimization/univariate/ test/java/org/apache/commons/math3/optimization/univariate/
Date Wed, 15 Feb 2012 23:24:33 GMT
Author: erans
Date: Wed Feb 15 23:24:33 2012
New Revision: 1244787

URL: http://svn.apache.org/viewvc?rev=1244787&view=rev
Log:
MATH-707
Renamed "UnivariateRealOptimizer" -> "UnivariateOptimizer".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateOptimizer.java
      - copied, changed from r1244760, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateRealOptimizer.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateRealOptimizer.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/BaseOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/package-info.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseAbstractUnivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseUnivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/BaseOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/BaseOptimizer.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/BaseOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/BaseOptimizer.java
Wed Feb 15 23:24:33 2012
@@ -25,7 +25,7 @@ package org.apache.commons.math3.optimiz
  *  <li>{@link org.apache.commons.math3.optimization.MultivariateOptimizer}</li>
  *  <li>{@link org.apache.commons.math3.optimization.DifferentiableMultivariateOptimizer}</li>
  *  <li>{@link org.apache.commons.math3.optimization.DifferentiableMultivariateVectorOptimizer}</li>
- *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateRealOptimizer}</li>
+ *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateOptimizer}</li>
  * </ul>
  *
  * @param <PAIR> Type of the point/objective pair.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/package-info.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/package-info.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/package-info.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/package-info.java
Wed Feb 15 23:24:33 2012
@@ -32,8 +32,8 @@
  * interfaces defining the common behavior of optimizers, one for each supported type of
objective
  * function:
  * <ul>
- *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateRealOptimizer
- *      UnivariateRealOptimizer} for {@link org.apache.commons.math3.analysis.UnivariateFunction
+ *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateOptimizer
+ *      UnivariateOptimizer} for {@link org.apache.commons.math3.analysis.UnivariateFunction
  *      univariate real functions}</li>
  *  <li>{@link org.apache.commons.math3.optimization.MultivariateOptimizer
  *      MultivariateOptimizer} for {@link org.apache.commons.math3.analysis.MultivariateFunction

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseAbstractUnivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseAbstractUnivariateOptimizer.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseAbstractUnivariateOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseAbstractUnivariateOptimizer.java
Wed Feb 15 23:24:33 2012
@@ -33,7 +33,7 @@ import org.apache.commons.math3.optimiza
  * @since 2.0
  */
 public abstract class BaseAbstractUnivariateOptimizer
-    implements UnivariateRealOptimizer {
+    implements UnivariateOptimizer {
     /** Convergence checker. */
     private final ConvergenceChecker<UnivariatePointValuePair> checker;
     /** Evaluations counter. */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseUnivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseUnivariateOptimizer.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseUnivariateOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/BaseUnivariateOptimizer.java
Wed Feb 15 23:24:33 2012
@@ -26,7 +26,7 @@ import org.apache.commons.math3.optimiza
  * Commons-Math. Users of the API are advised to base their code on
  * the following interfaces:
  * <ul>
- *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateRealOptimizer}</li>
+ *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateOptimizer}</li>
  * </ul>
  *
  * @param <FUNC> Type of the objective function to be optimized.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java
Wed Feb 15 23:24:33 2012
@@ -30,7 +30,7 @@ import org.apache.commons.math3.optimiza
 import org.apache.commons.math3.optimization.ConvergenceChecker;
 
 /**
- * Special implementation of the {@link UnivariateRealOptimizer} interface
+ * Special implementation of the {@link UnivariateOptimizer} interface
  * adding multi-start features to an existing optimizer.
  *
  * This class wraps a classical optimizer to use it several times in

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateOptimizer.java
(from r1244760, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateRealOptimizer.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateOptimizer.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateOptimizer.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateRealOptimizer.java&r1=1244760&r2=1244787&rev=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateRealOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateOptimizer.java
Wed Feb 15 23:24:33 2012
@@ -24,5 +24,5 @@ import org.apache.commons.math3.analysis
  * @version $Id$
  * @since 3.0
  */
-public interface UnivariateRealOptimizer
+public interface UnivariateOptimizer
     extends BaseUnivariateOptimizer<UnivariateFunction> {}

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
Wed Feb 15 23:24:33 2012
@@ -34,7 +34,7 @@ public final class BrentOptimizerTest {
     @Test
     public void testSinMin() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
+        UnivariateOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
         Assert.assertEquals(3 * Math.PI / 2, optimizer.optimize(200, f, GoalType.MINIMIZE,
4, 5).getPoint(),1e-8);
         Assert.assertTrue(optimizer.getEvaluations() <= 50);
         Assert.assertEquals(200, optimizer.getMaxEvaluations());
@@ -53,7 +53,7 @@ public final class BrentOptimizerTest {
     public void testQuinticMin() {
         // The function has local minima at -0.27195613 and 0.82221643.
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
+        UnivariateOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
         Assert.assertEquals(-0.27195613, optimizer.optimize(200, f, GoalType.MINIMIZE, -0.3,
-0.2).getPoint(), 1.0e-8);
         Assert.assertEquals( 0.82221643, optimizer.optimize(200, f, GoalType.MINIMIZE,  0.3,
 0.9).getPoint(), 1.0e-8);
         Assert.assertTrue(optimizer.getEvaluations() <= 50);
@@ -67,7 +67,7 @@ public final class BrentOptimizerTest {
     public void testQuinticMinStatistics() {
         // The function has local minima at -0.27195613 and 0.82221643.
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-11, 1e-14);
+        UnivariateOptimizer optimizer = new BrentOptimizer(1e-11, 1e-14);
 
         final DescriptiveStatistics[] stat = new DescriptiveStatistics[2];
         for (int i = 0; i < stat.length; i++) {
@@ -96,7 +96,7 @@ public final class BrentOptimizerTest {
         // The quintic function has zeros at 0, +-0.5 and +-1.
         // The function has a local maximum at 0.27195613.
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-12, 1e-14);
+        UnivariateOptimizer optimizer = new BrentOptimizer(1e-12, 1e-14);
         Assert.assertEquals(0.27195613, optimizer.optimize(100, f, GoalType.MAXIMIZE, 0.2,
0.3).getPoint(), 1e-8);
         try {
             optimizer.optimize(5, f, GoalType.MAXIMIZE, 0.2, 0.3);
@@ -109,7 +109,7 @@ public final class BrentOptimizerTest {
     @Test
     public void testMinEndpoints() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-8, 1e-14);
+        UnivariateOptimizer optimizer = new BrentOptimizer(1e-8, 1e-14);
 
         // endpoint is minimum
         double result = optimizer.optimize(50, f, GoalType.MINIMIZE, 3 * Math.PI / 2, 5).getPoint();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java?rev=1244787&r1=1244786&r2=1244787&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java
Wed Feb 15 23:24:33 2012
@@ -32,7 +32,7 @@ public class UnivariateMultiStartOptimiz
     @Test
     public void testSinMin() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealOptimizer underlying = new BrentOptimizer(1e-10, 1e-14);
+        UnivariateOptimizer underlying = new BrentOptimizer(1e-10, 1e-14);
         JDKRandomGenerator g = new JDKRandomGenerator();
         g.setSeed(44428400075l);
         UnivariateMultiStartOptimizer<UnivariateFunction> optimizer =
@@ -54,7 +54,7 @@ public class UnivariateMultiStartOptimiz
         // The quintic function has zeros at 0, +-0.5 and +-1.
         // The function has extrema (first derivative is zero) at 0.27195613 and 0.82221643,
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealOptimizer underlying = new BrentOptimizer(1e-9, 1e-14);
+        UnivariateOptimizer underlying = new BrentOptimizer(1e-9, 1e-14);
         JDKRandomGenerator g = new JDKRandomGenerator();
         g.setSeed(4312000053L);
         UnivariateMultiStartOptimizer<UnivariateFunction> optimizer =
@@ -83,7 +83,7 @@ public class UnivariateMultiStartOptimiz
                     return 0;
                 }
             };
-        UnivariateRealOptimizer underlying = new BrentOptimizer(1e-9, 1e-14);
+        UnivariateOptimizer underlying = new BrentOptimizer(1e-9, 1e-14);
         JDKRandomGenerator g = new JDKRandomGenerator();
         g.setSeed(4312000053L);
         UnivariateMultiStartOptimizer<UnivariateFunction> optimizer =



Mime
View raw message