commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1488421 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
Date Fri, 31 May 2013 22:22:08 GMT
Author: erans
Date: Fri May 31 22:22:08 2013
New Revision: 1488421

URL: http://svn.apache.org/r1488421
Log:
Make test reproducible.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java?rev=1488421&r1=1488420&r2=1488421&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
Fri May 31 22:22:08 2013
@@ -503,13 +503,12 @@ public final class BicubicSplineInterpol
             = new BicubicSplineInterpolatingFunction(xval, yval, zval,
                                                      dZdX, dZdY, dZdXdY);
         double x, y;
-        double expected, result;
 
         final RandomGenerator rng = new Well19937c(1234567L); // "tol" depends on the seed.
         final UniformRealDistribution distX
-            = new UniformRealDistribution(xval[0], xval[xval.length - 1]);
+            = new UniformRealDistribution(rng, xval[0], xval[xval.length - 1]);
         final UniformRealDistribution distY
-            = new UniformRealDistribution(yval[0], yval[yval.length - 1]);
+            = new UniformRealDistribution(rng, yval[0], yval[yval.length - 1]);
 
         final int numSamples = 50;
         final double tol = 6;
@@ -588,7 +587,6 @@ public final class BicubicSplineInterpol
         BivariateFunction bcf = new BicubicSplineInterpolatingFunction(xval, yval, zval,
                                                                        dZdX, dZdY, dZdXdY);
         double x, y;
-        double expected, result;
 
         final RandomGenerator rng = new Well19937c(1234567L); // "tol" depends on the seed.
         final UniformRealDistribution distX



Mime
View raw message