commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1073498 - in /commons/proper/math/branches/MATH_2_X/src: main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/interpolation/ main/java/org/apache/commons/math/analysis/polynomials/ main/java/org/apache/com...
Date Tue, 22 Feb 2011 20:57:26 GMT
Author: luc
Date: Tue Feb 22 20:57:26 2011
New Revision: 1073498

URL: http://svn.apache.org/viewvc?rev=1073498&view=rev
Log:
removed remaining bits of incompatible exception changes

Removed:
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/exception/MathUserException.java
Modified:
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
Tue Feb 22 20:57:26 2011
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 
 
@@ -87,7 +87,7 @@ public abstract class BinaryFunction imp
     };
 
     /** {@inheritDoc} */
-    public abstract double value(double x, double y) throws MathUserException;
+    public abstract double value(double x, double y) throws FunctionEvaluationException;
 
     /** Get a composable function by fixing the first argument of the instance.
      * @param fixedX fixed value of the first argument
@@ -97,7 +97,7 @@ public abstract class BinaryFunction imp
         return new ComposableFunction() {
             @Override
             /** {@inheritDoc} */
-            public double value(double x) throws MathUserException {
+            public double value(double x) throws FunctionEvaluationException {
                 return BinaryFunction.this.value(fixedX, x);
             }
         };
@@ -111,7 +111,7 @@ public abstract class BinaryFunction imp
         return new ComposableFunction() {
             @Override
             /** {@inheritDoc} */
-            public double value(double x) throws MathUserException {
+            public double value(double x) throws FunctionEvaluationException {
                 return BinaryFunction.this.value(x, fixedY);
             }
         };

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/BivariateRealFunction.java
Tue Feb 22 20:57:26 2011
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 
 /**
  * An interface representing a bivariate real function.
@@ -32,9 +32,9 @@ public interface BivariateRealFunction {
      * @param x Abscissa for which the function value should be computed.
      * @param y Ordinate for which the function value should be computed.
      * @return the value.
-     * @throws MathUserException if the function evaluation fails.
+     * @throws FunctionEvaluationException if the function evaluation fails.
      */
     double value(double x, double y)
-        throws MathUserException;
+        throws FunctionEvaluationException;
 
 }

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/TrivariateRealFunction.java
Tue Feb 22 20:57:26 2011
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 
 /**
  * An interface representing a trivariate real function.
@@ -33,8 +33,8 @@ public interface TrivariateRealFunction 
      * @param y y-coordinate for which the function value should be computed.
      * @param z z-coordinate for which the function value should be computed.
      * @return the value.
-     * @throws MathUserException if the function evaluation fails.
+     * @throws FunctionEvaluationException if the function evaluation fails.
      */
     double value(double x, double y, double z)
-        throws MathUserException;
+        throws FunctionEvaluationException;
 }

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
Tue Feb 22 20:57:26 2011
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 
 /**
  * An interface representing a univariate matrix function.
@@ -30,8 +30,8 @@ public interface UnivariateMatrixFunctio
      * Compute the value for the function.
      * @param x the point for which the function value should be computed
      * @return the value
-     * @throws MathUserException if the function evaluation fails
+     * @throws FunctionEvaluationException if the function evaluation fails
      */
-    double[][] value(double x) throws MathUserException;
+    double[][] value(double x) throws FunctionEvaluationException;
 
 }

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
Tue Feb 22 20:57:26 2011
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 
 /**
  * An interface representing a univariate vectorial function.
@@ -30,8 +30,8 @@ public interface UnivariateVectorialFunc
      * Compute the value for the function.
      * @param x the point for which the function value should be computed
      * @return the value
-     * @throws MathUserException if the function evaluation fails
+     * @throws FunctionEvaluationException if the function evaluation fails
      */
-    double[] value(double x) throws MathUserException;
+    double[] value(double x) throws FunctionEvaluationException;
 
 }

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
Tue Feb 22 20:57:26 2011
@@ -17,6 +17,7 @@
 package org.apache.commons.math.analysis.interpolation;
 
 import org.apache.commons.math.DimensionMismatchException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.analysis.BivariateRealFunction;
 import org.apache.commons.math.exception.NoDataException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -226,6 +227,7 @@ public class BicubicSplineInterpolatingF
      * @param x x-coordinate.
      * @param y y-coordinate.
      * @return the value at point (x, y) of the selected partial derivative.
+     * @throws FunctionEvaluationException
      */
     private double partialDerivative(int which, double x, double y) {
         if (partialDerivatives == null) {
@@ -244,10 +246,13 @@ public class BicubicSplineInterpolatingF
         final double xN = (x - xval[i]) / (xval[i + 1] - xval[i]);
         final double yN = (y - yval[j]) / (yval[j + 1] - yval[j]);
 
-        double result = Double.NaN;
-        result = partialDerivatives[which][i][j].value(xN, yN);
+        try {
+            return partialDerivatives[which][i][j].value(xN, yN);
+        } catch (FunctionEvaluationException fee) {
+            // this should never happen
+            throw new RuntimeException(fee);
+        }
 
-        return result;
     }
 
     /**

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
Tue Feb 22 20:57:26 2011
@@ -19,7 +19,7 @@ package org.apache.commons.math.analysis
 import org.apache.commons.math.DuplicateSampleAbscissaException;
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.util.FastMath;
 
@@ -81,11 +81,11 @@ public class PolynomialFunctionLagrangeF
     }
 
     /** {@inheritDoc} */
-    public double value(double z) throws MathUserException {
+    public double value(double z) throws FunctionEvaluationException {
         try {
             return evaluate(x, y, z);
         } catch (DuplicateSampleAbscissaException e) {
-            throw new MathUserException(e, e.getSpecificPattern(), e.getGeneralPattern(),
e.getArguments());
+            throw new FunctionEvaluationException(z, e.getSpecificPattern(), e.getGeneralPattern(),
e.getArguments());
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
Tue Feb 22 20:57:26 2011
@@ -18,7 +18,7 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
 /**
@@ -86,10 +86,10 @@ public class PolynomialFunctionNewtonFor
      *
      * @param z the point at which the function value is to be computed
      * @return the function value
-     * @throws MathUserException if a runtime error occurs
+     * @throws FunctionEvaluationException if a runtime error occurs
      * @see UnivariateRealFunction#value(double)
      */
-    public double value(double z) throws MathUserException {
+    public double value(double z) throws FunctionEvaluationException {
        return evaluate(a, c, z);
     }
 
@@ -153,11 +153,11 @@ public class PolynomialFunctionNewtonFor
      * @param c the centers
      * @param z the point at which the function value is to be computed
      * @return the function value
-     * @throws MathUserException if a runtime error occurs
+     * @throws FunctionEvaluationException if a runtime error occurs
      * @throws IllegalArgumentException if inputs are not valid
      */
     public static double evaluate(double a[], double c[], double z)
-        throws MathUserException, IllegalArgumentException {
+        throws FunctionEvaluationException, IllegalArgumentException {
 
         verifyInputArray(a, c);
 

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
Tue Feb 22 20:57:26 2011
@@ -24,7 +24,7 @@ import org.apache.commons.math.MathRunti
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.analysis.solvers.BrentSolver;
 import org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.random.RandomDataImpl;
 import org.apache.commons.math.util.FastMath;
@@ -96,15 +96,15 @@ public abstract class AbstractContinuous
         // subclasses can override if there is a better method.
         UnivariateRealFunction rootFindingFunction =
             new UnivariateRealFunction() {
-            public double value(double x) throws MathUserException {
+            public double value(double x) throws FunctionEvaluationException {
                 double ret = Double.NaN;
                 try {
                     ret = cumulativeProbability(x) - p;
                 } catch (MathException ex) {
-                    throw new MathUserException(ex, ex.getSpecificPattern(), ex.getGeneralPattern(),
ex.getArguments());
+                    throw new FunctionEvaluationException(x, ex.getSpecificPattern(), ex.getGeneralPattern(),
ex.getArguments());
                 }
                 if (Double.isNaN(ret)) {
-                    throw new MathUserException(LocalizedFormats.CUMULATIVE_PROBABILITY_RETURNED_NAN,
x, p);
+                    throw new FunctionEvaluationException(x, LocalizedFormats.CUMULATIVE_PROBABILITY_RETURNED_NAN,
x, p);
                 }
                 return ret;
             }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
Tue Feb 22 20:57:26 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathException;
 import org.apache.commons.math.DimensionMismatchException;
 import org.apache.commons.math.analysis.BivariateRealFunction;
@@ -265,7 +266,7 @@ public final class BicubicSplineInterpol
      * f(x, y) = &Sigma;<sub>i</sub>&Sigma;<sub>j</sub> (i+1)
(j+2) x<sup>i</sup> y<sup>j</sup>
      */
     @Test
-    public void testSplinePartialDerivatives() {
+    public void testSplinePartialDerivatives() throws FunctionEvaluationException {
         final int N = 4;
         final double[] coeff = new double[16];
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
Tue Feb 22 20:57:26 2011
@@ -20,7 +20,7 @@ import org.apache.commons.math.MathExcep
 import org.apache.commons.math.analysis.Expm1Function;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 
 import junit.framework.TestCase;
@@ -119,8 +119,8 @@ public final class NevilleInterpolatorTe
             double y[] = { 0.0, 4.0, 4.0, 2.5 };
             UnivariateRealFunction p = interpolator.interpolate(x, y);
             p.value(0.0);
-            fail("Expecting MathUserException - bad abscissas array");
-        } catch (MathUserException ex) {
+            fail("Expecting FunctionEvaluationException - bad abscissas array");
+        } catch (FunctionEvaluationException ex) {
             // expected
         }
     }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
Tue Feb 22 20:57:26 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
+import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.analysis.TrivariateRealFunction;
@@ -275,7 +276,7 @@ public final class TricubicSplineInterpo
      * </p>
      */
     @Test
-    public void testPlane() {
+    public void testPlane() throws FunctionEvaluationException {
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         double[] zval = new double[] {-12, -8, -5.5, -3, 0, 2.5};
@@ -380,7 +381,7 @@ public final class TricubicSplineInterpo
      * with A = 0.2, &omega; = 0.5, k<sub>x</sub> = 2, k<sub>y</sub>
= 1.
      */
     @Test
-    public void testWave() {
+    public void testWave() throws FunctionEvaluationException {
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         double[] zval = new double[] {-12, -8, -5.5, -3, 0, 4};

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
Tue Feb 22 20:57:26 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
+import org.apache.commons.math.FunctionEvaluationException;
+
 import junit.framework.TestCase;
 
 /**
@@ -32,7 +34,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the linear function.
      */
-    public void testLinearFunction() {
+    public void testLinearFunction() throws FunctionEvaluationException {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 
@@ -61,7 +63,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the quadratic function.
      */
-    public void testQuadraticFunction() {
+    public void testQuadraticFunction() throws FunctionEvaluationException {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 
@@ -91,7 +93,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the quintic function.
      */
-    public void testQuinticFunction() {
+    public void testQuinticFunction() throws FunctionEvaluationException {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java?rev=1073498&r1=1073497&r2=1073498&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
Tue Feb 22 20:57:26 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
+import org.apache.commons.math.FunctionEvaluationException;
+
 import junit.framework.TestCase;
 
 /**
@@ -30,7 +32,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the linear function.
      */
-    public void testLinearFunction() {
+    public void testLinearFunction() throws FunctionEvaluationException {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 
@@ -59,7 +61,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the quadratic function.
      */
-    public void testQuadraticFunction() {
+    public void testQuadraticFunction() throws FunctionEvaluationException {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 
@@ -89,7 +91,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the quintic function.
      */
-    public void testQuinticFunction() {
+    public void testQuinticFunction() throws FunctionEvaluationException {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 



Mime
View raw message