commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1243186 [1/2] - 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/ main/java/org/apache/commons/...
Date Sun, 12 Feb 2012 00:37:25 GMT
Author: erans
Date: Sun Feb 12 00:37:23 2012
New Revision: 1243186

URL: http://svn.apache.org/viewvc?rev=1243186&view=rev
Log:
MATH-707
Renamed "RealPointValuePair" to "PointValuePair" and made it a subclass
of "Pair<double[], Double>".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/PointValuePair.java
      - copied, changed from r1243179, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/RealPointValuePair.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariatePointValuePair.java
      - copied, changed from r1243179, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateRealPointValuePair.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/RealPointValuePair.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateRealPointValuePair.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateMultiStartOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateSimpleBoundsOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleRealPointChecker.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleScalarValueChecker.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/VectorialPointValuePair.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.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/MultiDirectionalSimplex.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/NelderMeadSimplex.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.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/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/LinearOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexTableau.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseAbstractUnivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseUnivariateOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizer.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/BOBYQAOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/MultivariateFunctionMappingAdapterTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/MultivariateFunctionPenaltyAdapterTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.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/direct/SimplexOptimizerNelderMeadTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizerTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateMultiStartOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateMultiStartOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateMultiStartOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateMultiStartOptimizer.java Sun Feb 12 00:37:23 2012
@@ -53,7 +53,7 @@ public class BaseMultivariateMultiStartO
     /** Random generator for multi-start. */
     private RandomVectorGenerator generator;
     /** Found optima. */
-    private RealPointValuePair[] optima;
+    private PointValuePair[] optima;
 
     /**
      * Create a multi-start optimizer from a single-start optimizer.
@@ -109,7 +109,7 @@ public class BaseMultivariateMultiStartO
      * #optimize(int,MultivariateFunction,GoalType,double[]) optimize}
      * has not been called.
      */
-    public RealPointValuePair[] getOptima() {
+    public PointValuePair[] getOptima() {
         if (optima == null) {
             throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
         }
@@ -127,19 +127,19 @@ public class BaseMultivariateMultiStartO
     }
 
     /** {@inheritDoc} */
-    public ConvergenceChecker<RealPointValuePair> getConvergenceChecker() {
+    public ConvergenceChecker<PointValuePair> getConvergenceChecker() {
         return optimizer.getConvergenceChecker();
     }
 
     /**
      * {@inheritDoc}
      */
-    public RealPointValuePair optimize(int maxEval, final FUNC f,
+    public PointValuePair optimize(int maxEval, final FUNC f,
                                        final GoalType goal,
                                        double[] startPoint) {
         maxEvaluations = maxEval;
         RuntimeException lastException = null;
-        optima = new RealPointValuePair[starts];
+        optima = new PointValuePair[starts];
         totalEvaluations = 0;
 
         // Multi-start loop.
@@ -173,9 +173,9 @@ public class BaseMultivariateMultiStartO
      * @param goal Goal type.
      */
     private void sortPairs(final GoalType goal) {
-        Arrays.sort(optima, new Comparator<RealPointValuePair>() {
-                public int compare(final RealPointValuePair o1,
-                                   final RealPointValuePair o2) {
+        Arrays.sort(optima, new Comparator<PointValuePair>() {
+                public int compare(final PointValuePair o1,
+                                   final PointValuePair o2) {
                     if (o1 == null) {
                         return (o2 == null) ? 0 : 1;
                     } else if (o2 == null) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateOptimizer.java Sun Feb 12 00:37:23 2012
@@ -34,7 +34,7 @@ import org.apache.commons.math.analysis.
  * @since 3.0
  */
 public interface BaseMultivariateOptimizer<FUNC extends MultivariateFunction>
-    extends BaseOptimizer<RealPointValuePair> {
+    extends BaseOptimizer<PointValuePair> {
     /**
      * Optimize an objective function.
      *
@@ -52,6 +52,6 @@ public interface BaseMultivariateOptimiz
      * @throws org.apache.commons.math.exception.NullArgumentException if
      * any argument is {@code null}.
      */
-    RealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                 double[] startPoint);
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateSimpleBoundsOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateSimpleBoundsOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateSimpleBoundsOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateSimpleBoundsOptimizer.java Sun Feb 12 00:37:23 2012
@@ -58,7 +58,7 @@ public interface BaseMultivariateSimpleB
      * @throws org.apache.commons.math.exception.NumberIsTooLargeException if any
      * of the initial values is greater than its upper bound.
      */
-    RealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                 double[] startPoint,
                                 double[] lowerBound, double[] upperBound);
 }

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/PointValuePair.java (from r1243179, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/RealPointValuePair.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/PointValuePair.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/PointValuePair.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/RealPointValuePair.java&r1=1243179&r2=1243186&rev=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/RealPointValuePair.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/PointValuePair.java Sun Feb 12 00:37:23 2012
@@ -17,70 +17,61 @@
 
 package org.apache.commons.math.optimization;
 
-import java.io.Serializable;
-
+import org.apache.commons.math.util.Pair;
 
 /**
- * This class holds a point and the value of an objective function at this point.
- * <p>This is a simple immutable container.</p>
- * @see VectorialPointValuePair
+ * This class holds a point and the value of an objective function at
+ * that point.
+ *
  * @see org.apache.commons.math.analysis.MultivariateFunction
  * @version $Id$
- * @since 2.0
+ * @since 3.0
  */
-public class RealPointValuePair implements Serializable {
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 1003888396256744753L;
-    /** Point coordinates. */
-    private final double[] point;
-    /** Value of the objective function at the point. */
-    private final double value;
-
-    /** Build a point/objective function value pair.
-     * @param point point coordinates (the built instance will store
-     * a copy of the array, not the array passed as argument)
-     * @param value value of an objective function at the point
+public class PointValuePair extends Pair<double[], Double> {
+    /**
+     * Builds a point/objective function value pair.
+     *
+     * @param point Point coordinates (this instance will store
+     * a copy of the array, not the array passed as argument).
+     * @param value Value of the objective function at the point.
      */
-    public RealPointValuePair(final double[] point, final double value) {
-        this.point = (point == null) ? null : point.clone();
-        this.value = value;
+    public PointValuePair(final double[] point,
+                          final double value) {
+        this(point, value, true);
     }
 
-    /** Build a point/objective function value pair.
-     * @param point point coordinates (the built instance will store
-     * a copy of the array, not the array passed as argument)
-     * @param value value of an objective function at the point
-     * @param copyArray if true, the input array will be copied, otherwise
-     * it will be referenced
+    /**
+     * Builds a point/objective function value pair.
+     *
+     * @param point Point coordinates.
+     * @param value Value of the objective function at the point.
+     * @param copyArray if {@code true}, the input array will be copied,
+     * otherwise it will be referenced.
      */
-    public RealPointValuePair(final double[] point, final double value,
-                              final boolean copyArray) {
-        this.point = copyArray ?
-                     ((point == null) ? null : point.clone()) :
-                     point;
-        this.value = value;
+    public PointValuePair(final double[] point,
+                          final double value,
+                          final boolean copyArray) {
+        super(copyArray ? ((point == null) ? null :
+                           point.clone()) :
+              point,
+              value);
     }
 
-    /** Get the point.
-     * @return a copy of the stored point
+    /**
+     * Gets the point.
+     *
+     * @return a copy of the stored point.
      */
     public double[] getPoint() {
-        return (point == null) ? null : point.clone();
+        return getKey().clone();
     }
 
-    /** Get a reference to the point.
-     * <p>This method is provided as a convenience to avoid copying
-     * the array, the elements of the array should <em>not</em> be modified.</p>
-     * @return a reference to the internal array storing the point
+    /**
+     * Gets a reference to the point.
+     *
+     * @return a reference to the internal array storing the point.
      */
     public double[] getPointRef() {
-        return point;
-    }
-
-    /** Get the value of the objective function.
-     * @return the stored value of the objective function
-     */
-    public double getValue() {
-        return value;
+        return getKey();
     }
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleRealPointChecker.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleRealPointChecker.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleRealPointChecker.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/SimpleRealPointChecker.java Sun Feb 12 00:37:23 2012
@@ -32,7 +32,7 @@ import org.apache.commons.math.util.Fast
  * @since 3.0
  */
 public class SimpleRealPointChecker
-    extends AbstractConvergenceChecker<RealPointValuePair> {
+    extends AbstractConvergenceChecker<PointValuePair> {
     /**
      * Build an instance with default threshold.
      */
@@ -70,8 +70,8 @@ public class SimpleRealPointChecker
      */
     @Override
     public boolean converged(final int iteration,
-                             final RealPointValuePair previous,
-                             final RealPointValuePair current) {
+                             final PointValuePair previous,
+                             final PointValuePair current) {
         final double[] p = previous.getPoint();
         final double[] c = current.getPoint();
         for (int i = 0; i < p.length; ++i) {

Modified: 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/SimpleScalarValueChecker.java?rev=1243186&r1=1243185&r2=1243186&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/SimpleScalarValueChecker.java Sun Feb 12 00:37:23 2012
@@ -32,7 +32,7 @@ import org.apache.commons.math.util.Fast
  * @since 3.0
  */
 public class SimpleScalarValueChecker
-    extends AbstractConvergenceChecker<RealPointValuePair> {
+    extends AbstractConvergenceChecker<PointValuePair> {
     /**
      * Build an instance with default thresholds.
      */
@@ -70,8 +70,8 @@ public class SimpleScalarValueChecker
      */
     @Override
     public boolean converged(final int iteration,
-                             final RealPointValuePair previous,
-                             final RealPointValuePair current) {
+                             final PointValuePair previous,
+                             final PointValuePair current) {
         final double p = previous.getValue();
         final double c = current.getValue();
         final double difference = FastMath.abs(p - c);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/VectorialPointValuePair.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/VectorialPointValuePair.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/VectorialPointValuePair.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/VectorialPointValuePair.java Sun Feb 12 00:37:23 2012
@@ -22,7 +22,7 @@ import java.io.Serializable;
 /**
  * This class holds a point and the vectorial value of an objective function at this point.
  * <p>This is a simple immutable container.</p>
- * @see RealPointValuePair
+ * @see PointValuePair
  * @see org.apache.commons.math.analysis.MultivariateVectorFunction
  * @version $Id$
  * @since 2.0

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java Sun Feb 12 00:37:23 2012
@@ -28,7 +28,7 @@ import org.apache.commons.math.exception
 import org.apache.commons.math.exception.NullArgumentException;
 import org.apache.commons.math.exception.MathIllegalArgumentException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 
 /**
  * This class implements the simplex concept.
@@ -49,7 +49,7 @@ import org.apache.commons.math.optimizat
  */
 public abstract class AbstractSimplex {
     /** Simplex. */
-    private RealPointValuePair[] simplex;
+    private PointValuePair[] simplex;
     /** Start simplex configuration. */
     private double[][] startConfiguration;
     /** Simplex dimension (must be equal to {@code simplex.length - 1}). */
@@ -203,7 +203,7 @@ public abstract class AbstractSimplex {
      * if the algorithm fails to converge.
      */
     public abstract void iterate(final MultivariateFunction evaluationFunction,
-                                 final Comparator<RealPointValuePair> comparator);
+                                 final Comparator<PointValuePair> comparator);
 
     /**
      * Build an initial simplex.
@@ -218,8 +218,8 @@ public abstract class AbstractSimplex {
         }
 
         // Set first vertex.
-        simplex = new RealPointValuePair[dimension + 1];
-        simplex[0] = new RealPointValuePair(startPoint, Double.NaN);
+        simplex = new PointValuePair[dimension + 1];
+        simplex[0] = new PointValuePair(startPoint, Double.NaN);
 
         // Set remaining vertices.
         for (int i = 0; i < dimension; i++) {
@@ -228,7 +228,7 @@ public abstract class AbstractSimplex {
             for (int k = 0; k < dimension; k++) {
                 vertexI[k] = startPoint[k] + confI[k];
             }
-            simplex[i + 1] = new RealPointValuePair(vertexI, Double.NaN);
+            simplex[i + 1] = new PointValuePair(vertexI, Double.NaN);
         }
     }
 
@@ -241,13 +241,13 @@ public abstract class AbstractSimplex {
      * if the maximal number of evaluations is exceeded.
      */
     public void evaluate(final MultivariateFunction evaluationFunction,
-                         final Comparator<RealPointValuePair> comparator) {
+                         final Comparator<PointValuePair> comparator) {
         // Evaluate the objective function at all non-evaluated simplex points.
         for (int i = 0; i < simplex.length; i++) {
-            final RealPointValuePair vertex = simplex[i];
+            final PointValuePair vertex = simplex[i];
             final double[] point = vertex.getPointRef();
             if (Double.isNaN(vertex.getValue())) {
-                simplex[i] = new RealPointValuePair(point, evaluationFunction.value(point), false);
+                simplex[i] = new PointValuePair(point, evaluationFunction.value(point), false);
             }
         }
 
@@ -262,11 +262,11 @@ public abstract class AbstractSimplex {
      * @param comparator Comparator to use for sorting the simplex vertices
      * from best to worst.
      */
-    protected void replaceWorstPoint(RealPointValuePair pointValuePair,
-                                     final Comparator<RealPointValuePair> comparator) {
+    protected void replaceWorstPoint(PointValuePair pointValuePair,
+                                     final Comparator<PointValuePair> comparator) {
         for (int i = 0; i < dimension; i++) {
             if (comparator.compare(simplex[i], pointValuePair) > 0) {
-                RealPointValuePair tmp = simplex[i];
+                PointValuePair tmp = simplex[i];
                 simplex[i] = pointValuePair;
                 pointValuePair = tmp;
             }
@@ -279,8 +279,8 @@ public abstract class AbstractSimplex {
      *
      * @return all the simplex points.
      */
-    public RealPointValuePair[] getPoints() {
-        final RealPointValuePair[] copy = new RealPointValuePair[simplex.length];
+    public PointValuePair[] getPoints() {
+        final PointValuePair[] copy = new PointValuePair[simplex.length];
         System.arraycopy(simplex, 0, copy, 0, simplex.length);
         return copy;
     }
@@ -291,7 +291,7 @@ public abstract class AbstractSimplex {
      * @param index Location.
      * @return the point at location {@code index}.
      */
-    public RealPointValuePair getPoint(int index) {
+    public PointValuePair getPoint(int index) {
         if (index < 0 ||
             index >= simplex.length) {
             throw new OutOfRangeException(index, 0, simplex.length - 1);
@@ -306,7 +306,7 @@ public abstract class AbstractSimplex {
      * @param index Location.
      * @param point New value.
      */
-    protected void setPoint(int index, RealPointValuePair point) {
+    protected void setPoint(int index, PointValuePair point) {
         if (index < 0 ||
             index >= simplex.length) {
             throw new OutOfRangeException(index, 0, simplex.length - 1);
@@ -320,7 +320,7 @@ public abstract class AbstractSimplex {
      *
      * @param points New Points.
      */
-    protected void setPoints(RealPointValuePair[] points) {
+    protected void setPoints(PointValuePair[] points) {
         if (points.length != simplex.length) {
             throw new DimensionMismatchException(points.length, simplex.length);
         }

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=1243186&r1=1243185&r2=1243186&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 Sun Feb 12 00:37:23 2012
@@ -28,7 +28,7 @@ import org.apache.commons.math.linear.Ar
 import org.apache.commons.math.linear.ArrayRealVector;
 import org.apache.commons.math.linear.RealVector;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
 
 /**
@@ -231,7 +231,7 @@ public class BOBYQAOptimizer
 
     /** {@inheritDoc} */
     @Override
-    protected RealPointValuePair doOptimize() {
+    protected PointValuePair doOptimize() {
         final double[] lowerBound = getLowerBound();
         final double[] upperBound = getUpperBound();
 
@@ -243,7 +243,7 @@ public class BOBYQAOptimizer
 
         final double value = bobyqa(lowerBound, upperBound);
 
-        return new RealPointValuePair(currentBest.getDataRef(),
+        return new PointValuePair(currentBest.getDataRef(),
                                       isMinimize ? value : -value);
     }
 

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -25,7 +25,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.optimization.BaseMultivariateOptimizer;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.SimpleScalarValueChecker;
 
 /**
@@ -43,7 +43,7 @@ public abstract class BaseAbstractMultiv
     /** Evaluations counter. */
     protected final Incrementor evaluations = new Incrementor();
     /** Convergence checker. */
-    private ConvergenceChecker<RealPointValuePair> checker;
+    private ConvergenceChecker<PointValuePair> checker;
     /** Type of optimization. */
     private GoalType goal;
     /** Initial guess. */
@@ -62,7 +62,7 @@ public abstract class BaseAbstractMultiv
     /**
      * @param checker Convergence checker.
      */
-    protected BaseAbstractMultivariateOptimizer(ConvergenceChecker<RealPointValuePair> checker) {
+    protected BaseAbstractMultivariateOptimizer(ConvergenceChecker<PointValuePair> checker) {
         this.checker = checker;
     }
 
@@ -77,7 +77,7 @@ public abstract class BaseAbstractMultiv
     }
 
     /** {@inheritDoc} */
-    public ConvergenceChecker<RealPointValuePair> getConvergenceChecker() {
+    public ConvergenceChecker<PointValuePair> getConvergenceChecker() {
         return checker;
     }
 
@@ -99,7 +99,7 @@ public abstract class BaseAbstractMultiv
     }
 
     /** {@inheritDoc} */
-    public RealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                        double[] startPoint) {
         // Checks.
         if (f == null) {
@@ -145,5 +145,5 @@ public abstract class BaseAbstractMultiv
      * @return the point/value pair giving the optimal value for the
      * objective function.
      */
-    protected abstract RealPointValuePair doOptimize();
+    protected abstract PointValuePair doOptimize();
 }

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -21,7 +21,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.optimization.BaseMultivariateOptimizer;
 import org.apache.commons.math.optimization.BaseMultivariateSimpleBoundsOptimizer;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
@@ -61,7 +61,7 @@ public abstract class BaseAbstractMultiv
     /**
      * @param checker Convergence checker.
      */
-    protected BaseAbstractMultivariateSimpleBoundsOptimizer(ConvergenceChecker<RealPointValuePair> checker) {
+    protected BaseAbstractMultivariateSimpleBoundsOptimizer(ConvergenceChecker<PointValuePair> checker) {
         super(checker);
     }
 
@@ -80,13 +80,13 @@ public abstract class BaseAbstractMultiv
     }
 
     /** {@inheritDoc} */
-    public RealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                        double[] startPoint) {
         return optimize(maxEval, f, goalType, startPoint, null, null);
     }
 
     /** {@inheritDoc} */
-    public RealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                        double[] startPoint,
                                        double[] lower, double[] upper) {
         // Checks.

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -34,7 +34,7 @@ import org.apache.commons.math.linear.Re
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.SimpleScalarValueChecker;
 import org.apache.commons.math.random.MersenneTwister;
 import org.apache.commons.math.random.RandomGenerator;
@@ -303,7 +303,7 @@ public class CMAESOptimizer
                           double[][] boundaries, int maxIterations, double stopFitness,
                           boolean isActiveCMA, int diagonalOnly, int checkFeasableCount,
                           RandomGenerator random, boolean generateStatistics,
-                          ConvergenceChecker<RealPointValuePair> checker) {
+                          ConvergenceChecker<PointValuePair> checker) {
         super(checker);
         this.lambda = lambda;
         this.inputSigma = inputSigma == null ? null : (double[]) inputSigma.clone();
@@ -356,7 +356,7 @@ public class CMAESOptimizer
 
     /** {@inheritDoc} */
     @Override
-    protected RealPointValuePair doOptimize() {
+    protected PointValuePair doOptimize() {
         checkParameters();
          // -------------------- Initialization --------------------------------
         isMinimize = getGoalType().equals(GoalType.MINIMIZE);
@@ -368,9 +368,9 @@ public class CMAESOptimizer
         iterations = 0;
         double bestValue = fitfun.value(guess);
         push(fitnessHistory, bestValue);
-        RealPointValuePair optimum = new RealPointValuePair(getStartPoint(),
+        PointValuePair optimum = new PointValuePair(getStartPoint(),
                 isMinimize ? bestValue : -bestValue);
-        RealPointValuePair lastResult = null;
+        PointValuePair lastResult = null;
 
         // -------------------- Generation Loop --------------------------------
 
@@ -425,7 +425,7 @@ public class CMAESOptimizer
                 if (bestValue > bestFitness) {
                     bestValue = bestFitness;
                     lastResult = optimum;
-                    optimum = new RealPointValuePair(
+                    optimum = new PointValuePair(
                             fitfun.decode(bestArx.getColumn(0)),
                             isMinimize ? bestFitness : -bestFitness);
                     if (getConvergenceChecker() != null && lastResult != null) {
@@ -472,8 +472,8 @@ public class CMAESOptimizer
                 }
                 // user defined termination
                 if (getConvergenceChecker() != null) {
-                    RealPointValuePair current =
-                        new RealPointValuePair(bestArx.getColumn(0),
+                    PointValuePair current =
+                        new PointValuePair(bestArx.getColumn(0),
                                 isMinimize ? bestFitness : -bestFitness);
                     if (lastResult != null &&
                         getConvergenceChecker().converged(iterations, current, lastResult)) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java Sun Feb 12 00:37:23 2012
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
 import java.util.Comparator;
 
 import org.apache.commons.math.analysis.MultivariateFunction;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 
 /**
  * This class implements the multi-directional direct search method.
@@ -153,18 +153,18 @@ public class MultiDirectionalSimplex ext
     /** {@inheritDoc} */
     @Override
     public void iterate(final MultivariateFunction evaluationFunction,
-                        final Comparator<RealPointValuePair> comparator) {
+                        final Comparator<PointValuePair> comparator) {
         // Save the original simplex.
-        final RealPointValuePair[] original = getPoints();
-        final RealPointValuePair best = original[0];
+        final PointValuePair[] original = getPoints();
+        final PointValuePair best = original[0];
 
         // Perform a reflection step.
-        final RealPointValuePair reflected = evaluateNewSimplex(evaluationFunction,
+        final PointValuePair reflected = evaluateNewSimplex(evaluationFunction,
                                                                 original, 1, comparator);
         if (comparator.compare(reflected, best) < 0) {
             // Compute the expanded simplex.
-            final RealPointValuePair[] reflectedSimplex = getPoints();
-            final RealPointValuePair expanded = evaluateNewSimplex(evaluationFunction,
+            final PointValuePair[] reflectedSimplex = getPoints();
+            final PointValuePair expanded = evaluateNewSimplex(evaluationFunction,
                                                                    original, khi, comparator);
             if (comparator.compare(reflected, expanded) <= 0) {
                 // Keep the reflected simplex.
@@ -191,10 +191,10 @@ public class MultiDirectionalSimplex ext
      * @throws org.apache.commons.math.exception.TooManyEvaluationsException
      * if the maximal number of evaluations is exceeded.
      */
-    private RealPointValuePair evaluateNewSimplex(final MultivariateFunction evaluationFunction,
-                                                  final RealPointValuePair[] original,
+    private PointValuePair evaluateNewSimplex(final MultivariateFunction evaluationFunction,
+                                                  final PointValuePair[] original,
                                                   final double coeff,
-                                                  final Comparator<RealPointValuePair> comparator) {
+                                                  final Comparator<PointValuePair> comparator) {
         final double[] xSmallest = original[0].getPointRef();
         // Perform a linear transformation on all the simplex points,
         // except the first one.
@@ -206,7 +206,7 @@ public class MultiDirectionalSimplex ext
             for (int j = 0; j < dim; j++) {
                 xTransformed[j] = xSmallest[j] + coeff * (xSmallest[j] - xOriginal[j]);
             }
-            setPoint(i, new RealPointValuePair(xTransformed, Double.NaN, false));
+            setPoint(i, new PointValuePair(xTransformed, Double.NaN, false));
         }
 
         // Evaluate the simplex.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/NelderMeadSimplex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/NelderMeadSimplex.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/NelderMeadSimplex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/NelderMeadSimplex.java Sun Feb 12 00:37:23 2012
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 import java.util.Comparator;
 
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.analysis.MultivariateFunction;
 
 /**
@@ -185,14 +185,14 @@ public class NelderMeadSimplex extends A
     /** {@inheritDoc} */
     @Override
     public void iterate(final MultivariateFunction evaluationFunction,
-                        final Comparator<RealPointValuePair> comparator) {
+                        final Comparator<PointValuePair> comparator) {
         // The simplex has n + 1 points if dimension is n.
         final int n = getDimension();
 
         // Interesting values.
-        final RealPointValuePair best = getPoint(0);
-        final RealPointValuePair secondBest = getPoint(n - 1);
-        final RealPointValuePair worst = getPoint(n);
+        final PointValuePair best = getPoint(0);
+        final PointValuePair secondBest = getPoint(n - 1);
+        final PointValuePair worst = getPoint(n);
         final double[] xWorst = worst.getPointRef();
 
         // Compute the centroid of the best vertices (dismissing the worst
@@ -214,8 +214,8 @@ public class NelderMeadSimplex extends A
         for (int j = 0; j < n; j++) {
             xR[j] = centroid[j] + rho * (centroid[j] - xWorst[j]);
         }
-        final RealPointValuePair reflected
-            = new RealPointValuePair(xR, evaluationFunction.value(xR), false);
+        final PointValuePair reflected
+            = new PointValuePair(xR, evaluationFunction.value(xR), false);
 
         if (comparator.compare(best, reflected) <= 0 &&
             comparator.compare(reflected, secondBest) < 0) {
@@ -227,8 +227,8 @@ public class NelderMeadSimplex extends A
             for (int j = 0; j < n; j++) {
                 xE[j] = centroid[j] + khi * (xR[j] - centroid[j]);
             }
-            final RealPointValuePair expanded
-                = new RealPointValuePair(xE, evaluationFunction.value(xE), false);
+            final PointValuePair expanded
+                = new PointValuePair(xE, evaluationFunction.value(xE), false);
 
             if (comparator.compare(expanded, reflected) < 0) {
                 // Accept the expansion point.
@@ -244,8 +244,8 @@ public class NelderMeadSimplex extends A
                 for (int j = 0; j < n; j++) {
                     xC[j] = centroid[j] + gamma * (xR[j] - centroid[j]);
                 }
-                final RealPointValuePair outContracted
-                    = new RealPointValuePair(xC, evaluationFunction.value(xC), false);
+                final PointValuePair outContracted
+                    = new PointValuePair(xC, evaluationFunction.value(xC), false);
                 if (comparator.compare(outContracted, reflected) <= 0) {
                     // Accept the contraction point.
                     replaceWorstPoint(outContracted, comparator);
@@ -257,8 +257,8 @@ public class NelderMeadSimplex extends A
                 for (int j = 0; j < n; j++) {
                     xC[j] = centroid[j] - gamma * (centroid[j] - xWorst[j]);
                 }
-                final RealPointValuePair inContracted
-                    = new RealPointValuePair(xC, evaluationFunction.value(xC), false);
+                final PointValuePair inContracted
+                    = new PointValuePair(xC, evaluationFunction.value(xC), false);
 
                 if (comparator.compare(inContracted, worst) < 0) {
                     // Accept the contraction point.
@@ -274,7 +274,7 @@ public class NelderMeadSimplex extends A
                 for (int j = 0; j < n; j++) {
                     x[j] = xSmallest[j] + sigma * (x[j] - xSmallest[j]);
                 }
-                setPoint(i, new RealPointValuePair(x, Double.NaN, false));
+                setPoint(i, new PointValuePair(x, Double.NaN, false));
             }
             evaluate(evaluationFunction, comparator);
         }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java Sun Feb 12 00:37:23 2012
@@ -24,12 +24,12 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.exception.NotStrictlyPositiveException;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
 import org.apache.commons.math.optimization.univariate.BracketFinder;
 import org.apache.commons.math.optimization.univariate.BrentOptimizer;
-import org.apache.commons.math.optimization.univariate.UnivariateRealPointValuePair;
+import org.apache.commons.math.optimization.univariate.UnivariatePointValuePair;
 
 /**
  * Powell algorithm.
@@ -78,7 +78,7 @@ public class PowellOptimizer
      */
     public PowellOptimizer(double rel,
                            double abs,
-                           ConvergenceChecker<RealPointValuePair> checker) {
+                           ConvergenceChecker<PointValuePair> checker) {
         super(checker);
 
         if (rel < MIN_RELATIVE_TOLERANCE) {
@@ -114,7 +114,7 @@ public class PowellOptimizer
 
     /** {@inheritDoc} */
     @Override
-    protected RealPointValuePair doOptimize() {
+    protected PointValuePair doOptimize() {
         final GoalType goal = getGoalType();
         final double[] guess = getStartPoint();
         final int n = guess.length;
@@ -124,7 +124,7 @@ public class PowellOptimizer
             direc[i][i] = 1;
         }
 
-        final ConvergenceChecker<RealPointValuePair> checker
+        final ConvergenceChecker<PointValuePair> checker
             = getConvergenceChecker();
 
         double[] x = guess;
@@ -145,7 +145,7 @@ public class PowellOptimizer
 
                 fX2 = fVal;
 
-                final UnivariateRealPointValuePair optimum = line.search(x, d);
+                final UnivariatePointValuePair optimum = line.search(x, d);
                 fVal = optimum.getValue();
                 alphaMin = optimum.getPoint();
                 final double[][] result = newPointAndDirection(x, d, alphaMin);
@@ -162,8 +162,8 @@ public class PowellOptimizer
                 (relativeThreshold * (FastMath.abs(fX) + FastMath.abs(fVal)) +
                  absoluteThreshold);
 
-            final RealPointValuePair previous = new RealPointValuePair(x1, fX);
-            final RealPointValuePair current = new RealPointValuePair(x, fVal);
+            final PointValuePair previous = new PointValuePair(x1, fX);
+            final PointValuePair current = new PointValuePair(x, fVal);
             if (!stop) { // User-defined stopping criteria.
                 if (checker != null) {
                     stop = checker.converged(iter, previous, current);
@@ -195,7 +195,7 @@ public class PowellOptimizer
                 t -= delta * temp * temp;
 
                 if (t < 0.0) {
-                    final UnivariateRealPointValuePair optimum = line.search(x, d);
+                    final UnivariatePointValuePair optimum = line.search(x, d);
                     fVal = optimum.getValue();
                     alphaMin = optimum.getPoint();
                     final double[][] result = newPointAndDirection(x, d, alphaMin);
@@ -262,7 +262,7 @@ public class PowellOptimizer
          * @throws org.apache.commons.math.exception.TooManyEvaluationsException
          * if the number of evaluations is exceeded.
          */
-        public UnivariateRealPointValuePair search(final double[] p, final double[] d) {
+        public UnivariatePointValuePair search(final double[] p, final double[] d) {
             final int n = p.length;
             final UnivariateFunction f = new UnivariateFunction() {
                     public double value(double alpha) {

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -23,7 +23,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.exception.NullArgumentException;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.SimpleScalarValueChecker;
 import org.apache.commons.math.optimization.MultivariateOptimizer;
 
@@ -100,7 +100,7 @@ public class SimplexOptimizer
     /**
      * @param checker Convergence checker.
      */
-    public SimplexOptimizer(ConvergenceChecker<RealPointValuePair> checker) {
+    public SimplexOptimizer(ConvergenceChecker<PointValuePair> checker) {
         super(checker);
     }
 
@@ -123,7 +123,7 @@ public class SimplexOptimizer
 
     /** {@inheritDoc} */
     @Override
-    protected RealPointValuePair doOptimize() {
+    protected PointValuePair doOptimize() {
         if (simplex == null) {
             throw new NullArgumentException();
         }
@@ -138,10 +138,10 @@ public class SimplexOptimizer
             };
 
         final boolean isMinim = getGoalType() == GoalType.MINIMIZE;
-        final Comparator<RealPointValuePair> comparator
-            = new Comparator<RealPointValuePair>() {
-            public int compare(final RealPointValuePair o1,
-                               final RealPointValuePair o2) {
+        final Comparator<PointValuePair> comparator
+            = new Comparator<PointValuePair>() {
+            public int compare(final PointValuePair o1,
+                               final PointValuePair o2) {
                 final double v1 = o1.getValue();
                 final double v2 = o2.getValue();
                 return isMinim ? Double.compare(v1, v2) : Double.compare(v2, v1);
@@ -152,14 +152,14 @@ public class SimplexOptimizer
         simplex.build(getStartPoint());
         simplex.evaluate(evalFunc, comparator);
 
-        RealPointValuePair[] previous = null;
+        PointValuePair[] previous = null;
         int iteration = 0;
-        final ConvergenceChecker<RealPointValuePair> checker = getConvergenceChecker();
+        final ConvergenceChecker<PointValuePair> checker = getConvergenceChecker();
         while (true) {
             if (iteration > 0) {
                 boolean converged = true;
                 for (int i = 0; i < simplex.getSize(); i++) {
-                    RealPointValuePair prev = previous[i];
+                    PointValuePair prev = previous[i];
                     converged &= checker.converged(iteration, prev, simplex.getPoint(i));
                 }
                 if (converged) {

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -22,7 +22,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.direct.BaseAbstractMultivariateOptimizer;
 
 /**
@@ -51,7 +51,7 @@ public abstract class AbstractScalarDiff
     /**
      * @param checker Convergence checker.
      */
-    protected AbstractScalarDifferentiableOptimizer(ConvergenceChecker<RealPointValuePair> checker) {
+    protected AbstractScalarDifferentiableOptimizer(ConvergenceChecker<PointValuePair> checker) {
         super(checker);
     }
 
@@ -69,7 +69,7 @@ public abstract class AbstractScalarDiff
 
     /** {@inheritDoc} */
     @Override
-    public RealPointValuePair optimize(int maxEval,
+    public PointValuePair optimize(int maxEval,
                                        final DifferentiableMultivariateFunction f,
                                        final GoalType goalType,
                                        final double[] startPoint) {

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -23,7 +23,7 @@ import org.apache.commons.math.analysis.
 import org.apache.commons.math.analysis.solvers.UnivariateSolver;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.optimization.SimpleScalarValueChecker;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.util.FastMath;
@@ -77,7 +77,7 @@ public class NonLinearConjugateGradientO
      * @param checker Convergence checker.
      */
     public NonLinearConjugateGradientOptimizer(final ConjugateGradientFormula updateFormula,
-                                               ConvergenceChecker<RealPointValuePair> checker) {
+                                               ConvergenceChecker<PointValuePair> checker) {
         this(updateFormula,
              checker,
              new BrentSolver(),
@@ -95,7 +95,7 @@ public class NonLinearConjugateGradientO
      * @param lineSearchSolver Solver to use during line search.
      */
     public NonLinearConjugateGradientOptimizer(final ConjugateGradientFormula updateFormula,
-                                               ConvergenceChecker<RealPointValuePair> checker,
+                                               ConvergenceChecker<PointValuePair> checker,
                                                final UnivariateSolver lineSearchSolver) {
         this(updateFormula,
              checker,
@@ -112,7 +112,7 @@ public class NonLinearConjugateGradientO
      * @param preconditioner Preconditioner.
      */
     public NonLinearConjugateGradientOptimizer(final ConjugateGradientFormula updateFormula,
-                                               ConvergenceChecker<RealPointValuePair> checker,
+                                               ConvergenceChecker<PointValuePair> checker,
                                                final UnivariateSolver lineSearchSolver,
                                                final Preconditioner preconditioner) {
         super(checker);
@@ -143,8 +143,8 @@ public class NonLinearConjugateGradientO
 
     /** {@inheritDoc} */
     @Override
-    protected RealPointValuePair doOptimize() {
-        final ConvergenceChecker<RealPointValuePair> checker = getConvergenceChecker();
+    protected PointValuePair doOptimize() {
+        final ConvergenceChecker<PointValuePair> checker = getConvergenceChecker();
         point = getStartPoint();
         final GoalType goal = getGoalType();
         final int n = point.length;
@@ -164,15 +164,15 @@ public class NonLinearConjugateGradientO
             delta += r[i] * searchDirection[i];
         }
 
-        RealPointValuePair current = null;
+        PointValuePair current = null;
         int iter = 0;
         int maxEval = getMaxEvaluations();
         while (true) {
             ++iter;
 
             final double objective = computeObjectiveValue(point);
-            RealPointValuePair previous = current;
-            current = new RealPointValuePair(point, objective);
+            PointValuePair previous = current;
+            current = new PointValuePair(point, objective);
             if (previous != null) {
                 if (checker.converged(iter, previous, current)) {
                     // We have found an optimum.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java Sun Feb 12 00:37:23 2012
@@ -22,7 +22,7 @@ import java.util.Collection;
 import org.apache.commons.math.exception.MathIllegalStateException;
 import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 
 /**
  * Base class for implementing linear optimizers.
@@ -101,7 +101,7 @@ public abstract class AbstractLinearOpti
     }
 
     /** {@inheritDoc} */
-    public RealPointValuePair optimize(final LinearObjectiveFunction f,
+    public PointValuePair optimize(final LinearObjectiveFunction f,
                                        final Collection<LinearConstraint> constraints,
                                        final GoalType goalType, final boolean restrictToNonNegative)
          throws MathIllegalStateException {
@@ -124,7 +124,7 @@ public abstract class AbstractLinearOpti
      * @exception MathIllegalStateException if no solution fulfilling the constraints
      * can be found in the allowed number of iterations
      */
-    protected abstract RealPointValuePair doOptimize()
+    protected abstract PointValuePair doOptimize()
         throws MathIllegalStateException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/LinearOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/LinearOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/LinearOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/LinearOptimizer.java Sun Feb 12 00:37:23 2012
@@ -21,7 +21,7 @@ import java.util.Collection;
 
 import org.apache.commons.math.exception.MathIllegalStateException;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 
 /**
  * This interface represents an optimization algorithm for linear problems.
@@ -82,7 +82,7 @@ public interface LinearOptimizer {
      * @exception MathIllegalStateException if no solution fulfilling the constraints
      * can be found in the allowed number of iterations
      */
-   RealPointValuePair optimize(LinearObjectiveFunction f, Collection<LinearConstraint> constraints,
+   PointValuePair optimize(LinearObjectiveFunction f, Collection<LinearConstraint> constraints,
                                GoalType goalType, boolean restrictToNonNegative)
         throws MathIllegalStateException;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexSolver.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexSolver.java Sun Feb 12 00:37:23 2012
@@ -21,7 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.math.exception.MaxCountExceededException;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.util.Precision;
 
 
@@ -182,7 +182,7 @@ public class SimplexSolver extends Abstr
 
     /** {@inheritDoc} */
     @Override
-    public RealPointValuePair doOptimize()
+    public PointValuePair doOptimize()
         throws MaxCountExceededException, UnboundedSolutionException, NoFeasibleSolutionException {
         final SimplexTableau tableau =
             new SimplexTableau(function, linearConstraints, goal, nonNegative,

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexTableau.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexTableau.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexTableau.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/SimplexTableau.java Sun Feb 12 00:37:23 2012
@@ -32,7 +32,7 @@ import org.apache.commons.math.linear.Ma
 import org.apache.commons.math.linear.RealMatrix;
 import org.apache.commons.math.linear.RealVector;
 import org.apache.commons.math.optimization.GoalType;
-import org.apache.commons.math.optimization.RealPointValuePair;
+import org.apache.commons.math.optimization.PointValuePair;
 import org.apache.commons.math.util.Precision;
 
 /**
@@ -393,7 +393,7 @@ class SimplexTableau implements Serializ
      *
      * @return current solution
      */
-    protected RealPointValuePair getSolution() {
+    protected PointValuePair getSolution() {
       int negativeVarColumn = columnLabels.indexOf(NEGATIVE_VAR_COLUMN_LABEL);
       Integer negativeVarBasicRow = negativeVarColumn > 0 ? getBasicRow(negativeVarColumn) : null;
       double mostNegative = negativeVarBasicRow == null ? 0 : getEntry(negativeVarBasicRow, getRhsOffset());
@@ -423,7 +423,7 @@ class SimplexTableau implements Serializ
                   (restrictToNonNegative ? 0 : mostNegative);
           }
       }
-      return new RealPointValuePair(coefficients, f.getValue(coefficients));
+      return new PointValuePair(coefficients, f.getValue(coefficients));
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseAbstractUnivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseAbstractUnivariateOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseAbstractUnivariateOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseAbstractUnivariateOptimizer.java Sun Feb 12 00:37:23 2012
@@ -35,7 +35,7 @@ import org.apache.commons.math.optimizat
 public abstract class BaseAbstractUnivariateOptimizer
     implements UnivariateRealOptimizer {
     /** Convergence checker. */
-    private final ConvergenceChecker<UnivariateRealPointValuePair> checker;
+    private final ConvergenceChecker<UnivariatePointValuePair> checker;
     /** Evaluations counter. */
     private final Incrementor evaluations = new Incrementor();
     /** Optimization type */
@@ -52,7 +52,7 @@ public abstract class BaseAbstractUnivar
     /**
      * @param checker Convergence checking procedure.
      */
-    protected BaseAbstractUnivariateOptimizer(ConvergenceChecker<UnivariateRealPointValuePair> checker) {
+    protected BaseAbstractUnivariateOptimizer(ConvergenceChecker<UnivariatePointValuePair> checker) {
         this.checker = checker;
     }
 
@@ -109,7 +109,7 @@ public abstract class BaseAbstractUnivar
     }
 
     /** {@inheritDoc} */
-    public UnivariateRealPointValuePair optimize(int maxEval, UnivariateFunction f,
+    public UnivariatePointValuePair optimize(int maxEval, UnivariateFunction f,
                                                  GoalType goalType,
                                                  double min, double max,
                                                  double startValue) {
@@ -135,7 +135,7 @@ public abstract class BaseAbstractUnivar
     }
 
     /** {@inheritDoc} */
-    public UnivariateRealPointValuePair optimize(int maxEval,
+    public UnivariatePointValuePair optimize(int maxEval,
                                                  UnivariateFunction f,
                                                  GoalType goalType,
                                                  double min, double max){
@@ -145,7 +145,7 @@ public abstract class BaseAbstractUnivar
     /**
      * {@inheritDoc}
      */
-    public ConvergenceChecker<UnivariateRealPointValuePair> getConvergenceChecker() {
+    public ConvergenceChecker<UnivariatePointValuePair> getConvergenceChecker() {
         return checker;
     }
 
@@ -157,5 +157,5 @@ public abstract class BaseAbstractUnivar
      * @throws TooManyEvaluationsException if the maximal number of evaluations
      * is exceeded.
      */
-    protected abstract UnivariateRealPointValuePair doOptimize();
+    protected abstract UnivariatePointValuePair doOptimize();
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseUnivariateOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseUnivariateOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseUnivariateOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BaseUnivariateOptimizer.java Sun Feb 12 00:37:23 2012
@@ -35,7 +35,7 @@ import org.apache.commons.math.optimizat
  * @since 3.0
  */
 public interface BaseUnivariateOptimizer<FUNC extends UnivariateFunction>
-    extends BaseOptimizer<UnivariateRealPointValuePair> {
+    extends BaseOptimizer<UnivariatePointValuePair> {
     /**
      * Find an optimum in the given interval.
      *
@@ -55,7 +55,7 @@ public interface BaseUnivariateOptimizer
      * @throws IllegalArgumentException if {@code min > max} or the endpoints
      * do not satisfy the requirements specified by the optimizer.
      */
-    UnivariateRealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    UnivariatePointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                           double min, double max);
 
     /**
@@ -79,7 +79,7 @@ public interface BaseUnivariateOptimizer
      * @throws org.apache.commons.math.exception.NullArgumentException if any
      * argument is {@code null}.
      */
-    UnivariateRealPointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
+    UnivariatePointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                           double min, double max,
                                           double startValue);
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java Sun Feb 12 00:37:23 2012
@@ -71,7 +71,7 @@ public class BrentOptimizer extends Base
      */
     public BrentOptimizer(double rel,
                           double abs,
-                          ConvergenceChecker<UnivariateRealPointValuePair> checker) {
+                          ConvergenceChecker<UnivariatePointValuePair> checker) {
         super(checker);
 
         if (rel < MIN_RELATIVE_TOLERANCE) {
@@ -105,14 +105,14 @@ public class BrentOptimizer extends Base
 
     /** {@inheritDoc} */
     @Override
-    protected UnivariateRealPointValuePair doOptimize() {
+    protected UnivariatePointValuePair doOptimize() {
         final boolean isMinim = getGoalType() == GoalType.MINIMIZE;
         final double lo = getMin();
         final double mid = getStartValue();
         final double hi = getMax();
 
         // Optional additional convergence criteria.
-        final ConvergenceChecker<UnivariateRealPointValuePair> checker
+        final ConvergenceChecker<UnivariatePointValuePair> checker
             = getConvergenceChecker();
 
         double a;
@@ -137,9 +137,9 @@ public class BrentOptimizer extends Base
         double fv = fx;
         double fw = fx;
 
-        UnivariateRealPointValuePair previous = null;
-        UnivariateRealPointValuePair current
-            = new UnivariateRealPointValuePair(x, isMinim ? fx : -fx);
+        UnivariatePointValuePair previous = null;
+        UnivariatePointValuePair current
+            = new UnivariatePointValuePair(x, isMinim ? fx : -fx);
 
         int iter = 0;
         while (true) {
@@ -254,7 +254,7 @@ public class BrentOptimizer extends Base
                 }
 
                 previous = current;
-                current = new UnivariateRealPointValuePair(x, isMinim ? fx : -fx);
+                current = new UnivariatePointValuePair(x, isMinim ? fx : -fx);
 
                 // User-defined convergence checker.
                 if (checker != null) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizer.java?rev=1243186&r1=1243185&r2=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateMultiStartOptimizer.java Sun Feb 12 00:37:23 2012
@@ -55,7 +55,7 @@ public class UnivariateMultiStartOptimiz
     /** Random generator for multi-start. */
     private RandomGenerator generator;
     /** Found optima. */
-    private UnivariateRealPointValuePair[] optima;
+    private UnivariatePointValuePair[] optima;
 
     /**
      * Create a multi-start optimizer from a single-start optimizer.
@@ -88,7 +88,7 @@ public class UnivariateMultiStartOptimiz
     /**
      * {@inheritDoc}
      */
-    public ConvergenceChecker<UnivariateRealPointValuePair> getConvergenceChecker() {
+    public ConvergenceChecker<UnivariatePointValuePair> getConvergenceChecker() {
         return optimizer.getConvergenceChecker();
     }
 
@@ -129,7 +129,7 @@ public class UnivariateMultiStartOptimiz
      * #optimize(int,UnivariateFunction,GoalType,double,double) optimize}
      * has not been called.
      */
-    public UnivariateRealPointValuePair[] getOptima() {
+    public UnivariatePointValuePair[] getOptima() {
         if (optima == null) {
             throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
         }
@@ -137,19 +137,19 @@ public class UnivariateMultiStartOptimiz
     }
 
     /** {@inheritDoc} */
-    public UnivariateRealPointValuePair optimize(int maxEval, final FUNC f,
+    public UnivariatePointValuePair optimize(int maxEval, final FUNC f,
                                                  final GoalType goal,
                                                  final double min, final double max) {
         return optimize(maxEval, f, goal, min, max, min + 0.5 * (max - min));
     }
 
     /** {@inheritDoc} */
-    public UnivariateRealPointValuePair optimize(int maxEval, final FUNC f,
+    public UnivariatePointValuePair optimize(int maxEval, final FUNC f,
                                                  final GoalType goal,
                                                  final double min, final double max,
                                                  final double startValue) {
         RuntimeException lastException = null;
-        optima = new UnivariateRealPointValuePair[starts];
+        optima = new UnivariatePointValuePair[starts];
         totalEvaluations = 0;
 
         // Multi-start loop.
@@ -183,9 +183,9 @@ public class UnivariateMultiStartOptimiz
      * @param goal Goal type.
      */
     private void sortPairs(final GoalType goal) {
-        Arrays.sort(optima, new Comparator<UnivariateRealPointValuePair>() {
-                public int compare(final UnivariateRealPointValuePair o1,
-                                   final UnivariateRealPointValuePair o2) {
+        Arrays.sort(optima, new Comparator<UnivariatePointValuePair>() {
+                public int compare(final UnivariatePointValuePair o1,
+                                   final UnivariatePointValuePair o2) {
                     if (o1 == null) {
                         return (o2 == null) ? 0 : 1;
                     } else if (o2 == null) {

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariatePointValuePair.java (from r1243179, commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateRealPointValuePair.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariatePointValuePair.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariatePointValuePair.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateRealPointValuePair.java&r1=1243179&r2=1243186&rev=1243186&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariateRealPointValuePair.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/UnivariatePointValuePair.java Sun Feb 12 00:37:23 2012
@@ -27,7 +27,7 @@ import java.io.Serializable;
  * @version $Id$
  * @since 3.0
  */
-public class UnivariateRealPointValuePair implements Serializable {
+public class UnivariatePointValuePair implements Serializable {
     /** Serializable version identifier. */
     private static final long serialVersionUID = 1003888396256744753L;
     /** Point. */
@@ -41,7 +41,7 @@ public class UnivariateRealPointValuePai
      * @param point Point.
      * @param value Value of an objective function at the point
      */
-    public UnivariateRealPointValuePair(final double point,
+    public UnivariatePointValuePair(final double point,
                                         final double value) {
         this.point = point;
         this.value = value;

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -53,11 +53,11 @@ public class DifferentiableMultivariateM
                                                   new GaussianRandomGenerator(g));
         DifferentiableMultivariateMultiStartOptimizer optimizer =
             new DifferentiableMultivariateMultiStartOptimizer(underlying, 10, generator);
-        RealPointValuePair optimum =
+        PointValuePair optimum =
             optimizer.optimize(200, circle, GoalType.MINIMIZE, new double[] { 98.680, 47.345 });
         Assert.assertEquals(200, optimizer.getMaxEvaluations());
-        RealPointValuePair[] optima = optimizer.getOptima();
-        for (RealPointValuePair o : optima) {
+        PointValuePair[] optima = optimizer.getOptima();
+        for (PointValuePair o : optima) {
             Point2D.Double center = new Point2D.Double(o.getPointRef()[0], o.getPointRef()[1]);
             Assert.assertEquals(69.960161753, circle.getRadius(center), 1.0e-8);
             Assert.assertEquals(96.075902096, center.x, 1.0e-8);

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=1243186&r1=1243185&r2=1243186&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 00:37:23 2012
@@ -44,7 +44,7 @@ public class MultivariateMultiStartOptim
             new UncorrelatedRandomVectorGenerator(2, new GaussianRandomGenerator(g));
         MultivariateMultiStartOptimizer optimizer =
             new MultivariateMultiStartOptimizer(underlying, 10, generator);
-        RealPointValuePair optimum =
+        PointValuePair optimum =
             optimizer.optimize(1100, rosenbrock, GoalType.MINIMIZE, new double[] { -1.2, 1.0 });
 
         Assert.assertEquals(rosenbrock.getCount(), optimizer.getEvaluations());



Mime
View raw message