commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1236676 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/function/ main/java/org/apache/commons/math/analysis/interpolation/ test/java/org/apache/commons/math/analy...
Date Fri, 27 Jan 2012 13:23:12 GMT
Author: erans
Date: Fri Jan 27 13:23:12 2012
New Revision: 1236676

URL: http://svn.apache.org/viewvc?rev=1236676&view=rev
Log:
MATH-707
Renamed "BivariateRealFunction" to "BivariateFunction".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateFunction.java
      - copied, changed from r1236660, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BivariateRealGridInterpolator.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateFunction.java
(from r1236660, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateFunction.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateFunction.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java&r1=1236660&r2=1236676&rev=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BivariateFunction.java
Fri Jan 27 13:23:12 2012
@@ -23,7 +23,7 @@ package org.apache.commons.math.analysis
  * @since 2.1
  * @version $Id$
  */
-public interface BivariateRealFunction {
+public interface BivariateFunction {
     /**
      * Compute the value for the function.
      *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java
Fri Jan 27 13:23:12 2012
@@ -211,7 +211,7 @@ public class FunctionUtils {
      * @param g Function.
      * @return the composite function.
      */
-    public static UnivariateFunction combine(final BivariateRealFunction combiner,
+    public static UnivariateFunction combine(final BivariateFunction combiner,
                                                  final UnivariateFunction f,
                                                  final UnivariateFunction g) {
         return new UnivariateFunction() {
@@ -232,7 +232,7 @@ public class FunctionUtils {
      * @param initialValue Initial value.
      * @return a collector function.
      */
-    public static MultivariateFunction collector(final BivariateRealFunction combiner,
+    public static MultivariateFunction collector(final BivariateFunction combiner,
                                                      final UnivariateFunction f,
                                                      final double initialValue) {
         return new MultivariateFunction() {
@@ -256,7 +256,7 @@ public class FunctionUtils {
      * @param initialValue Initial value.
      * @return a collector function.
      */
-    public static MultivariateFunction collector(final BivariateRealFunction combiner,
+    public static MultivariateFunction collector(final BivariateFunction combiner,
                                                      final double initialValue) {
         return collector(combiner, new Identity(), initialValue);
     }
@@ -268,7 +268,7 @@ public class FunctionUtils {
      * @param fixed Value to which the first argument of {@code f} is set.
      * @return the unary function h(x) = f(fixed, x)
      */
-    public static UnivariateFunction fix1stArgument(final BivariateRealFunction f,
+    public static UnivariateFunction fix1stArgument(final BivariateFunction f,
                                                         final double fixed) {
         return new UnivariateFunction() {
             /** {@inheritDoc} */
@@ -284,7 +284,7 @@ public class FunctionUtils {
      * @param fixed Value to which the second argument of {@code f} is set.
      * @return the unary function h(x) = f(x, fixed)
      */
-    public static UnivariateFunction fix2ndArgument(final BivariateRealFunction f,
+    public static UnivariateFunction fix2ndArgument(final BivariateFunction f,
                                                         final double fixed) {
         return new UnivariateFunction() {
             /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 
 /**
  * Add the two operands.
@@ -25,7 +25,7 @@ import org.apache.commons.math.analysis.
  * @version $Id$
  * @since 3.0
  */
-public class Add implements BivariateRealFunction {
+public class Add implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return x + y;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.apache.commons.math.util.FastMath;
 
 /**
@@ -26,7 +26,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 3.0
  */
-public class Atan2 implements BivariateRealFunction {
+public class Atan2 implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return FastMath.atan2(x, y);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 
 /**
  * Divide the first operand by the second.
@@ -25,7 +25,7 @@ import org.apache.commons.math.analysis.
  * @version $Id$
  * @since 3.0
  */
-public class Divide implements BivariateRealFunction {
+public class Divide implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return x / y;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.apache.commons.math.util.FastMath;
 
 /**
@@ -26,7 +26,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 3.0
  */
-public class Max implements BivariateRealFunction {
+public class Max implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return FastMath.max(x, y);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.apache.commons.math.util.FastMath;
 
 /**
@@ -26,7 +26,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 3.0
  */
-public class Min implements BivariateRealFunction {
+public class Min implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return FastMath.min(x, y);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 
 /**
  * Multiply the two operands.
@@ -25,7 +25,7 @@ import org.apache.commons.math.analysis.
  * @version $Id$
  * @since 3.0
  */
-public class Multiply implements BivariateRealFunction {
+public class Multiply implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return x * y;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.apache.commons.math.util.FastMath;
 
 /**
@@ -26,7 +26,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 3.0
  */
-public class Pow implements BivariateRealFunction {
+public class Pow implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return FastMath.pow(x, y);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java
Fri Jan 27 13:23:12 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis.function;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 
 /**
  * Subtract the second operand from the first.
@@ -25,7 +25,7 @@ import org.apache.commons.math.analysis.
  * @version $Id$
  * @since 3.0
  */
-public class Subtract implements BivariateRealFunction {
+public class Subtract implements BivariateFunction {
     /** {@inheritDoc} */
     public double value(double x, double y) {
         return x - y;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
Fri Jan 27 13:23:12 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.NoDataException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -31,7 +31,7 @@ import org.apache.commons.math.util.Math
  * @since 2.1
  */
 public class BicubicSplineInterpolatingFunction
-    implements BivariateRealFunction {
+    implements BivariateFunction {
     /**
      * Matrix to compute the spline coefficients from the function values
      * and function derivatives values
@@ -70,7 +70,7 @@ public class BicubicSplineInterpolatingF
      * 3 = second partial derivatives wrt y
      * 4 = cross partial derivatives
      */
-    private BivariateRealFunction[][][] partialDerivatives = null;
+    private BivariateFunction[][][] partialDerivatives = null;
 
     /**
      * @param x Sample values of the x-coordinate, in increasing order.
@@ -248,7 +248,7 @@ public class BicubicSplineInterpolatingF
     private void computePartialDerivatives() {
         final int lastI = xval.length - 1;
         final int lastJ = yval.length - 1;
-        partialDerivatives = new BivariateRealFunction[5][lastI][lastJ];
+        partialDerivatives = new BivariateFunction[5][lastI][lastJ];
 
         for (int i = 0; i < lastI; i++) {
             for (int j = 0; j < lastJ; j++) {
@@ -335,7 +335,7 @@ public class BicubicSplineInterpolatingF
  * @version $Id$
  */
 class BicubicSplineFunction
-    implements BivariateRealFunction {
+    implements BivariateFunction {
 
     /** Number of points. */
     private static final short N = 4;
@@ -344,19 +344,19 @@ class BicubicSplineFunction
     private final double[][] a;
 
     /** First partial derivative along x. */
-    private BivariateRealFunction partialDerivativeX;
+    private BivariateFunction partialDerivativeX;
 
     /** First partial derivative along y. */
-    private BivariateRealFunction partialDerivativeY;
+    private BivariateFunction partialDerivativeY;
 
     /** Second partial derivative along x. */
-    private BivariateRealFunction partialDerivativeXX;
+    private BivariateFunction partialDerivativeXX;
 
     /** Second partial derivative along y. */
-    private BivariateRealFunction partialDerivativeYY;
+    private BivariateFunction partialDerivativeYY;
 
     /** Second crossed partial derivative. */
-    private BivariateRealFunction partialDerivativeXY;
+    private BivariateFunction partialDerivativeXY;
 
     /**
      * Simple constructor.
@@ -415,7 +415,7 @@ class BicubicSplineFunction
     /**
      * @return the partial derivative wrt {@code x}.
      */
-    public BivariateRealFunction partialDerivativeX() {
+    public BivariateFunction partialDerivativeX() {
         if (partialDerivativeX == null) {
             computePartialDerivatives();
         }
@@ -425,7 +425,7 @@ class BicubicSplineFunction
     /**
      * @return the partial derivative wrt {@code y}.
      */
-    public BivariateRealFunction partialDerivativeY() {
+    public BivariateFunction partialDerivativeY() {
         if (partialDerivativeY == null) {
             computePartialDerivatives();
         }
@@ -435,7 +435,7 @@ class BicubicSplineFunction
     /**
      * @return the second partial derivative wrt {@code x}.
      */
-    public BivariateRealFunction partialDerivativeXX() {
+    public BivariateFunction partialDerivativeXX() {
         if (partialDerivativeXX == null) {
             computePartialDerivatives();
         }
@@ -445,7 +445,7 @@ class BicubicSplineFunction
     /**
      * @return the second partial derivative wrt {@code y}.
      */
-    public BivariateRealFunction partialDerivativeYY() {
+    public BivariateFunction partialDerivativeYY() {
         if (partialDerivativeYY == null) {
             computePartialDerivatives();
         }
@@ -455,7 +455,7 @@ class BicubicSplineFunction
     /**
      * @return the second partial cross-derivative.
      */
-    public BivariateRealFunction partialDerivativeXY() {
+    public BivariateFunction partialDerivativeXY() {
         if (partialDerivativeXY == null) {
             computePartialDerivatives();
         }
@@ -484,7 +484,7 @@ class BicubicSplineFunction
             }
         }
 
-        partialDerivativeX = new BivariateRealFunction() {
+        partialDerivativeX = new BivariateFunction() {
                 public double value(double x, double y)  {
                     final double x2 = x * x;
                     final double[] pX = {0, 1, x, x2};
@@ -496,7 +496,7 @@ class BicubicSplineFunction
                     return apply(pX, pY, aX);
                 }
             };
-        partialDerivativeY = new BivariateRealFunction() {
+        partialDerivativeY = new BivariateFunction() {
                 public double value(double x, double y)  {
                     final double x2 = x * x;
                     final double x3 = x2 * x;
@@ -508,7 +508,7 @@ class BicubicSplineFunction
                     return apply(pX, pY, aY);
                 }
             };
-        partialDerivativeXX = new BivariateRealFunction() {
+        partialDerivativeXX = new BivariateFunction() {
                 public double value(double x, double y)  {
                     final double[] pX = {0, 0, 1, x};
 
@@ -519,7 +519,7 @@ class BicubicSplineFunction
                     return apply(pX, pY, aXX);
                 }
             };
-        partialDerivativeYY = new BivariateRealFunction() {
+        partialDerivativeYY = new BivariateFunction() {
                 public double value(double x, double y)  {
                     final double x2 = x * x;
                     final double x3 = x2 * x;
@@ -530,7 +530,7 @@ class BicubicSplineFunction
                     return apply(pX, pY, aYY);
                 }
             };
-        partialDerivativeXY = new BivariateRealFunction() {
+        partialDerivativeXY = new BivariateFunction() {
                 public double value(double x, double y)  {
                     final double x2 = x * x;
                     final double[] pX = {0, 1, x, x2};

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BivariateRealGridInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BivariateRealGridInterpolator.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BivariateRealGridInterpolator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BivariateRealGridInterpolator.java
Fri Jan 27 13:23:12 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 
 /**
  * Interface representing a bivariate real interpolating function where the
@@ -40,6 +40,6 @@ public interface BivariateRealGridInterp
      * @throws org.apache.commons.math.exception.DimensionMismatchException
      * if the array lengths are inconsistent.
      */
-    BivariateRealFunction interpolate(double[] xval, double[] yval,
+    BivariateFunction interpolate(double[] xval, double[] yval,
                                       double[][] fval);
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java
Fri Jan 27 13:23:12 2012
@@ -145,7 +145,7 @@ public class FunctionUtilsTest {
 
     @Test
     public void testCombine() {
-        BivariateRealFunction bi = new Add();
+        BivariateFunction bi = new Add();
         UnivariateFunction id = new Identity();
         UnivariateFunction m = new Minus();
         UnivariateFunction c = FunctionUtils.combine(bi, id, m);
@@ -159,7 +159,7 @@ public class FunctionUtilsTest {
 
     @Test
     public void testCollector() {
-        BivariateRealFunction bi = new Add();
+        BivariateFunction bi = new Add();
         MultivariateFunction coll = FunctionUtils.collector(bi, 0);
         Assert.assertEquals(10, coll.value(new double[] {1, 2, 3, 4}), EPS);
 
@@ -178,7 +178,7 @@ public class FunctionUtilsTest {
 
     @Test
     public void testSinc() {
-        BivariateRealFunction div = new Divide();
+        BivariateFunction div = new Divide();
         UnivariateFunction sin = new Sin();
         UnivariateFunction id = new Identity();
         UnivariateFunction sinc1 = FunctionUtils.combine(div, sin, id);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
Fri Jan 27 13:23:12 2012
@@ -18,7 +18,7 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.MathIllegalArgumentException;
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -38,7 +38,7 @@ public final class BicubicSplineInterpol
         double[][] zval = new double[xval.length][yval.length];
 
         @SuppressWarnings("unused")
-        BivariateRealFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
+        BivariateFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
                                                                            zval, zval, zval);
         
         double[] wxval = new double[] {3, 2, 5, 6.5};
@@ -118,7 +118,7 @@ public final class BicubicSplineInterpol
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         // Function values
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x - 3 * y + 5;
                 }
@@ -151,7 +151,7 @@ public final class BicubicSplineInterpol
             }
         }
 
-        BivariateRealFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
+        BivariateFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
                                                                            dZdX, dZdY, dZdXdY);
         double x, y;
         double expected, result;
@@ -188,7 +188,7 @@ public final class BicubicSplineInterpol
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         // Function values
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x * x - 3 * y * y + 4 * x * y - 5;
                 }
@@ -201,7 +201,7 @@ public final class BicubicSplineInterpol
         }
         // Partial derivatives with respect to x
         double[][] dZdX = new double[xval.length][yval.length];
-        BivariateRealFunction dfdX = new BivariateRealFunction() {
+        BivariateFunction dfdX = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 4 * (x + y);
                 }
@@ -213,7 +213,7 @@ public final class BicubicSplineInterpol
         }
         // Partial derivatives with respect to y
         double[][] dZdY = new double[xval.length][yval.length];
-        BivariateRealFunction dfdY = new BivariateRealFunction() {
+        BivariateFunction dfdY = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 4 * x - 6 * y;
                 }
@@ -231,7 +231,7 @@ public final class BicubicSplineInterpol
             }
         }
 
-        BivariateRealFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
+        BivariateFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
                                                                            dZdX, dZdY, dZdXdY);
         double x, y;
         double expected, result;
@@ -275,12 +275,12 @@ public final class BicubicSplineInterpol
         }
 
         final BicubicSplineFunction f = new BicubicSplineFunction(coeff);
-        BivariateRealFunction derivative;
+        BivariateFunction derivative;
         final double x = 0.435;
         final double y = 0.776;
         final double tol = 1e-13;
 
-        derivative = new BivariateRealFunction() {
+        derivative = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double y2 = y * y;
@@ -292,7 +292,7 @@ public final class BicubicSplineInterpol
         Assert.assertEquals("dFdX", derivative.value(x, y),
                             f.partialDerivativeX().value(x, y), tol);
         
-        derivative = new BivariateRealFunction() {
+        derivative = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double x3 = x2 * x;
@@ -304,7 +304,7 @@ public final class BicubicSplineInterpol
         Assert.assertEquals("dFdY", derivative.value(x, y),
                             f.partialDerivativeY().value(x, y), tol);
 
-        derivative = new BivariateRealFunction() {
+        derivative = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double y2 = y * y;
                     final double y3 = y2 * y;
@@ -315,7 +315,7 @@ public final class BicubicSplineInterpol
         Assert.assertEquals("d2FdX2", derivative.value(x, y),
                             f.partialDerivativeXX().value(x, y), tol);
 
-        derivative = new BivariateRealFunction() {
+        derivative = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double x3 = x2 * x;
@@ -326,7 +326,7 @@ public final class BicubicSplineInterpol
         Assert.assertEquals("d2FdY2", derivative.value(x, y),
                             f.partialDerivativeYY().value(x, y), tol);
 
-        derivative = new BivariateRealFunction() {
+        derivative = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double y2 = y * y;
@@ -357,7 +357,7 @@ public final class BicubicSplineInterpol
             val[i] = i * delta;
         }
         // Function values
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double x3 = x2 * x;
@@ -378,7 +378,7 @@ public final class BicubicSplineInterpol
         }
         // Partial derivatives with respect to x
         double[][] dFdX = new double[sz][sz];
-        BivariateRealFunction dfdX = new BivariateRealFunction() {
+        BivariateFunction dfdX = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double y2 = y * y;                    
@@ -392,7 +392,7 @@ public final class BicubicSplineInterpol
         }
         // Partial derivatives with respect to y
         double[][] dFdY = new double[sz][sz];
-        BivariateRealFunction dfdY = new BivariateRealFunction() {
+        BivariateFunction dfdY = new BivariateFunction() {
                 public double value(double x, double y) {
                     final double x2 = x * x;
                     final double y2 = y * y;                    
@@ -406,7 +406,7 @@ public final class BicubicSplineInterpol
         }
         // Partial cross-derivatives
         double[][] d2FdXdY = new double[sz][sz];
-        BivariateRealFunction d2fdXdY = new BivariateRealFunction() {
+        BivariateFunction d2fdXdY = new BivariateFunction() {
                 public double value(double x, double y) {
                     return -1 + 8 * x - 2 * y;
                 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatorTest.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatorTest.java
Fri Jan 27 13:23:12 2012
@@ -18,7 +18,7 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.MathIllegalArgumentException;
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -40,7 +40,7 @@ public final class BicubicSplineInterpol
         BivariateRealGridInterpolator interpolator = new BicubicSplineInterpolator();
         
         @SuppressWarnings("unused")
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         
         double[] wxval = new double[] {3, 2, 5, 6.5};
         try {
@@ -81,7 +81,7 @@ public final class BicubicSplineInterpol
      */
     @Test
     public void testPlane() {
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x - 3 * y + 5;
                 }
@@ -98,7 +98,7 @@ public final class BicubicSplineInterpol
             }
         }
 
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         double x, y;
         double expected, result;
         
@@ -128,7 +128,7 @@ public final class BicubicSplineInterpol
      */
     @Test
     public void testParaboloid() {
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x * x - 3 * y * y + 4 * x * y - 5;
                 }
@@ -145,7 +145,7 @@ public final class BicubicSplineInterpol
             }
         }
 
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         double x, y;
         double expected, result;
         

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java?rev=1236676&r1=1236675&r2=1236676&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
Fri Jan 27 13:23:12 2012
@@ -19,7 +19,7 @@ package org.apache.commons.math.analysis
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.MathIllegalArgumentException;
 import org.apache.commons.math.util.FastMath;
-import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.analysis.BivariateFunction;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -41,7 +41,7 @@ public final class SmoothingPolynomialBi
         BivariateRealGridInterpolator interpolator = new SmoothingPolynomialBicubicSplineInterpolator(0);
         
         @SuppressWarnings("unused")
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         
         double[] wxval = new double[] {3, 2, 5, 6.5};
         try {
@@ -89,7 +89,7 @@ public final class SmoothingPolynomialBi
      */
     @Test
     public void testPlane() {
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x - 3 * y + 5
                         + ((int) (FastMath.abs(5 * x + 3 * y)) % 2 == 0 ? 1 : -1);
@@ -107,7 +107,7 @@ public final class SmoothingPolynomialBi
             }
         }
 
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         double x, y;
         double expected, result;
         
@@ -137,7 +137,7 @@ public final class SmoothingPolynomialBi
      */
     @Test
     public void testParaboloid() {
-        BivariateRealFunction f = new BivariateRealFunction() {
+        BivariateFunction f = new BivariateFunction() {
                 public double value(double x, double y) {
                     return 2 * x * x - 3 * y * y + 4 * x * y - 5
                         + ((int) (FastMath.abs(5 * x + 3 * y)) % 2 == 0 ? 1 : -1);
@@ -155,7 +155,7 @@ public final class SmoothingPolynomialBi
             }
         }
 
-        BivariateRealFunction p = interpolator.interpolate(xval, yval, zval);
+        BivariateFunction p = interpolator.interpolate(xval, yval, zval);
         double x, y;
         double expected, result;
 



Mime
View raw message