commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1236932 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/interpolation/ test/java/org/apache/commons/math/analysis/interpolation/
Date Sat, 28 Jan 2012 00:06:21 GMT
Author: erans
Date: Sat Jan 28 00:06:21 2012
New Revision: 1236932

URL: http://svn.apache.org/viewvc?rev=1236932&view=rev
Log:
Math-707
Renamed "TrivariateRealFunction" to "TrivariateFunction".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateFunction.java
      - copied, changed from r1236919, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TrivariateRealGridInterpolator.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateFunction.java
(from r1236919, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateFunction.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateFunction.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java&r1=1236919&r2=1236932&rev=1236932&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/TrivariateFunction.java
Sat Jan 28 00:06:21 2012
@@ -23,7 +23,7 @@ package org.apache.commons.math.analysis
  * @since 2.2
  * @version $Id$
  */
-public interface TrivariateRealFunction {
+public interface TrivariateFunction {
     /**
      * Compute the value for the function.
      *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunction.java?rev=1236932&r1=1236931&r2=1236932&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunction.java
Sat Jan 28 00:06:21 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
-import org.apache.commons.math.analysis.TrivariateRealFunction;
+import org.apache.commons.math.analysis.TrivariateFunction;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.NoDataException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -36,7 +36,7 @@ import org.apache.commons.math.util.Math
  * @since 2.2
  */
 public class TricubicSplineInterpolatingFunction
-    implements TrivariateRealFunction {
+    implements TrivariateFunction {
     /**
      * Matrix to compute the spline coefficients from the function values
      * and function derivatives values
@@ -421,7 +421,7 @@ public class TricubicSplineInterpolating
  * @version $Id$
  */
 class TricubicSplineFunction
-    implements TrivariateRealFunction {
+    implements TrivariateFunction {
     /** Number of points. */
     private static final short N = 4;
     /** Coefficients */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TrivariateRealGridInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TrivariateRealGridInterpolator.java?rev=1236932&r1=1236931&r2=1236932&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TrivariateRealGridInterpolator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/TrivariateRealGridInterpolator.java
Sat Jan 28 00:06:21 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
-import org.apache.commons.math.analysis.TrivariateRealFunction;
+import org.apache.commons.math.analysis.TrivariateFunction;
 
 /**
  * Interface representing a trivariate real interpolating function where the
@@ -43,6 +43,6 @@ public interface TrivariateRealGridInter
      * @throws org.apache.commons.math.exception.DimensionMismatchException
      * if the array lengths are inconsistent.
      */
-    TrivariateRealFunction interpolate(double[] xval, double[] yval, double[] zval,
+    TrivariateFunction interpolate(double[] xval, double[] yval, double[] zval,
                                        double[][][] fval);
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java?rev=1236932&r1=1236931&r2=1236932&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
Sat Jan 28 00:06:21 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.TrivariateRealFunction;
+import org.apache.commons.math.analysis.TrivariateFunction;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -40,7 +40,7 @@ public final class TricubicSplineInterpo
         double[][][] fval = new double[xval.length][yval.length][zval.length];
 
         @SuppressWarnings("unused")
-        TrivariateRealFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval,
zval,
+        TrivariateFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval, zval,
                                                                              fval, fval,
fval, fval,
                                                                              fval, fval,
fval, fval);
         
@@ -281,7 +281,7 @@ public final class TricubicSplineInterpo
         double[] zval = new double[] {-12, -8, -5.5, -3, 0, 2.5};
 
         // Function values
-        TrivariateRealFunction f = new TrivariateRealFunction() {
+        TrivariateFunction f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return 2 * x - 3 * y - 4 * z + 5;
                 }
@@ -340,7 +340,7 @@ public final class TricubicSplineInterpo
             }
         }
 
-        TrivariateRealFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval,
zval,
+        TrivariateFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval, zval,
                                                                              fval, dFdX,
dFdY, dFdZ,
                                                                              d2FdXdY, d2FdXdZ,
d2FdYdZ,
                                                                              d3FdXdYdZ);
@@ -391,7 +391,7 @@ public final class TricubicSplineInterpo
         final double ky = 1;
         
         // Function values
-        TrivariateRealFunction f = new TrivariateRealFunction() {
+        TrivariateFunction f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.cos(omega * z - kx * x - ky * y);
                 }
@@ -408,7 +408,7 @@ public final class TricubicSplineInterpo
         
         // Partial derivatives with respect to x
         double[][][] dFdX = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction dFdX_f = new TrivariateRealFunction() {
+        TrivariateFunction dFdX_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.sin(omega * z - kx * x - ky * y) * kx;
                 }
@@ -423,7 +423,7 @@ public final class TricubicSplineInterpo
             
         // Partial derivatives with respect to y
         double[][][] dFdY = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction dFdY_f = new TrivariateRealFunction() {
+        TrivariateFunction dFdY_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.sin(omega * z - kx * x - ky * y) * ky;
                 }
@@ -438,7 +438,7 @@ public final class TricubicSplineInterpo
 
         // Partial derivatives with respect to z
         double[][][] dFdZ = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction dFdZ_f = new TrivariateRealFunction() {
+        TrivariateFunction dFdZ_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return -a * FastMath.sin(omega * z - kx * x - ky * y) * omega;
                 }
@@ -453,7 +453,7 @@ public final class TricubicSplineInterpo
 
         // Partial second derivatives w.r.t. (x, y)
         double[][][] d2FdXdY = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction d2FdXdY_f = new TrivariateRealFunction() {
+        TrivariateFunction d2FdXdY_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return -a * FastMath.cos(omega * z - kx * x - ky * y) * kx * ky;
                 }
@@ -468,7 +468,7 @@ public final class TricubicSplineInterpo
 
         // Partial second derivatives w.r.t. (x, z)
         double[][][] d2FdXdZ = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction d2FdXdZ_f = new TrivariateRealFunction() {
+        TrivariateFunction d2FdXdZ_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.cos(omega * z - kx * x - ky * y) * kx * omega;
                 }
@@ -483,7 +483,7 @@ public final class TricubicSplineInterpo
 
         // Partial second derivatives w.r.t. (y, z)
         double[][][] d2FdYdZ = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction d2FdYdZ_f = new TrivariateRealFunction() {
+        TrivariateFunction d2FdYdZ_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.cos(omega * z - kx * x - ky * y) * ky * omega;
                 }
@@ -498,7 +498,7 @@ public final class TricubicSplineInterpo
 
         // Partial third derivatives
         double[][][] d3FdXdYdZ = new double[xval.length][yval.length][zval.length];
-        TrivariateRealFunction d3FdXdYdZ_f = new TrivariateRealFunction() {
+        TrivariateFunction d3FdXdYdZ_f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.sin(omega * z - kx * x - ky * y) * kx * ky * omega;
                 }
@@ -511,7 +511,7 @@ public final class TricubicSplineInterpo
             }
         }
 
-        TrivariateRealFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval,
zval,
+        TrivariateFunction tcf = new TricubicSplineInterpolatingFunction(xval, yval, zval,
                                                                              fval, dFdX,
dFdY, dFdZ,
                                                                              d2FdXdY, d2FdXdZ,
d2FdYdZ,
                                                                              d3FdXdYdZ);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java?rev=1236932&r1=1236931&r2=1236932&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java
Sat Jan 28 00:06:21 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.TrivariateRealFunction;
+import org.apache.commons.math.analysis.TrivariateFunction;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -42,7 +42,7 @@ public final class TricubicSplineInterpo
         TrivariateRealGridInterpolator interpolator = new TricubicSplineInterpolator();
         
         @SuppressWarnings("unused")
-        TrivariateRealFunction p = interpolator.interpolate(xval, yval, zval, fval);
+        TrivariateFunction p = interpolator.interpolate(xval, yval, zval, fval);
         
         double[] wxval = new double[] {3, 2, 5, 6.5};
         try {
@@ -98,7 +98,7 @@ public final class TricubicSplineInterpo
      */
     @Test
     public void testPlane() {
-        TrivariateRealFunction f = new TrivariateRealFunction() {
+        TrivariateFunction f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return 2 * x - 3 * y - z + 5;
                 }
@@ -118,7 +118,7 @@ public final class TricubicSplineInterpo
             }
         }
 
-        TrivariateRealFunction p = interpolator.interpolate(xval, yval, zval, fval);
+        TrivariateFunction p = interpolator.interpolate(xval, yval, zval, fval);
         double x, y, z;
         double expected, result;
         
@@ -164,7 +164,7 @@ public final class TricubicSplineInterpo
         final double ky = 1;
 
         // Function values
-        TrivariateRealFunction f = new TrivariateRealFunction() {
+        TrivariateFunction f = new TrivariateFunction() {
                 public double value(double x, double y, double z) {
                     return a * FastMath.cos(omega * z - kx * x - ky * y);
                 }
@@ -181,7 +181,7 @@ public final class TricubicSplineInterpo
 
         TrivariateRealGridInterpolator interpolator = new TricubicSplineInterpolator();
 
-        TrivariateRealFunction p = interpolator.interpolate(xval, yval, zval, fval);
+        TrivariateFunction p = interpolator.interpolate(xval, yval, zval, fval);
         double x, y, z;
         double expected, result;
         



Mime
View raw message