commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r739836 - /commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
Date Sun, 01 Feb 2009 21:06:56 GMT
Author: luc
Date: Sun Feb  1 21:06:55 2009
New Revision: 739836

URL: http://svn.apache.org/viewvc?rev=739836&view=rev
Log:
fixed an error introduced by a recent change in PolynomialsFunction
(the coefficients array is automatically reduced if high degree coefficients are null)

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

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java?rev=739836&r1=739835&r2=739836&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
Sun Feb  1 21:06:55 2009
@@ -63,9 +63,9 @@
         
         // Verify coefficients using analytical values
         PolynomialFunction polynomials[] = ((PolynomialSplineFunction) f).getPolynomials();
-        double target[] = {y[0], 1d, 0d, 0d};
+        double target[] = {y[0], 1d};
         TestUtils.assertEquals(polynomials[0].getCoefficients(), target, coefficientTolerance);
-        target = new double[]{y[1], 1d, 0d, 0d};
+        target = new double[]{y[1], 1d};
         TestUtils.assertEquals(polynomials[1].getCoefficients(), target, coefficientTolerance);
         
         // Check interpolation
@@ -84,11 +84,11 @@
         
         // Verify coefficients using analytical values
         PolynomialFunction polynomials[] = ((PolynomialSplineFunction) f).getPolynomials();
-        double target[] = {y[0], 1d, 0d, 0d};
+        double target[] = {y[0], 1d};
         TestUtils.assertEquals(polynomials[0].getCoefficients(), target, coefficientTolerance);
-        target = new double[]{y[1], 1d, 0d, 0d};
+        target = new double[]{y[1], 1d};
         TestUtils.assertEquals(polynomials[1].getCoefficients(), target, coefficientTolerance);
-        target = new double[]{y[2], 1d, 0d, 0d};
+        target = new double[]{y[2], 1d};
         TestUtils.assertEquals(polynomials[2].getCoefficients(), target, coefficientTolerance);
         
         // Check interpolation



Mime
View raw message