You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/02/01 20:41:34 UTC
svn commit: r1066171 -
/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/
Author: sebb
Date: Tue Feb 1 19:41:34 2011
New Revision: 1066171
URL: http://svn.apache.org/viewvc?rev=1066171&view=rev
Log:
Remove unnecessary throws clauses
Modified:
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/DividedDifferenceInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/LinearInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatorTest.java
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=1066171&r1=1066170&r2=1066171&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 Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.analysis.BivariateRealFunction;
@@ -33,7 +32,7 @@ public final class BicubicSplineInterpol
* Test preconditions.
*/
@Test
- public void testPreconditions() throws MathException {
+ public void testPreconditions() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2.5};
double[][] zval = new double[xval.length][yval.length];
@@ -115,7 +114,7 @@ public final class BicubicSplineInterpol
* z = 2 x - 3 y + 5
*/
@Test
- public void testPlane() throws MathException {
+ public void testPlane() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2, 2.5};
// Function values
@@ -185,7 +184,7 @@ public final class BicubicSplineInterpol
* z = 2 x<sup>2</sup> - 3 y<sup>2</sup> + 4 x y - 5
*/
@Test
- public void testParaboloid() throws MathException {
+ public void testParaboloid() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2, 2.5};
// Function values
@@ -349,7 +348,7 @@ public final class BicubicSplineInterpol
* + 4 x<sup>2</sup> y - x y<sup>2</sup> - 3 x<sup>3</sup> + y<sup>3</sup>
*/
@Test
- public void testMatchingPartialDerivatives() throws MathException {
+ public void testMatchingPartialDerivatives() {
final int sz = 21;
double[] val = new double[sz];
// Coordinate values
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=1066171&r1=1066170&r2=1066171&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 Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.analysis.BivariateRealFunction;
@@ -33,7 +32,7 @@ public final class BicubicSplineInterpol
* Test preconditions.
*/
@Test
- public void testPreconditions() throws MathException {
+ public void testPreconditions() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2.5};
double[][] zval = new double[xval.length][yval.length];
@@ -81,7 +80,7 @@ public final class BicubicSplineInterpol
* z = 2 x - 3 y + 5
*/
@Test
- public void testPlane() throws MathException {
+ public void testPlane() {
BivariateRealFunction f = new BivariateRealFunction() {
public double value(double x, double y) {
return 2 * x - 3 * y + 5;
@@ -128,7 +127,7 @@ public final class BicubicSplineInterpol
* z = 2 x<sup>2</sup> - 3 y<sup>2</sup> + 4 x y - 5
*/
@Test
- public void testParaboloid() throws MathException {
+ public void testParaboloid() {
BivariateRealFunction f = new BivariateRealFunction() {
public double value(double x, double y) {
return 2 * x * x - 3 * y * y + 4 * x * y - 5;
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java?rev=1066171&r1=1066170&r2=1066171&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.NonMonotonousSequenceException;
import org.apache.commons.math.analysis.Expm1Function;
import org.apache.commons.math.analysis.SinFunction;
@@ -46,7 +45,7 @@ public final class DividedDifferenceInte
* <p>
* |sin^(n)(zeta)| <= 1.0, zeta in [0, 2*PI]
*/
- public void testSinFunction() throws MathException {
+ public void testSinFunction() {
UnivariateRealFunction f = new SinFunction();
UnivariateRealInterpolator interpolator = new DividedDifferenceInterpolator();
double x[], y[], z, expected, result, tolerance;
@@ -77,7 +76,7 @@ public final class DividedDifferenceInte
* <p>
* |expm1^(n)(zeta)| <= e, zeta in [-1, 1]
*/
- public void testExpm1Function() throws MathException {
+ public void testExpm1Function() {
UnivariateRealFunction f = new Expm1Function();
UnivariateRealInterpolator interpolator = new DividedDifferenceInterpolator();
double x[], y[], z, expected, result, tolerance;
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/LinearInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/LinearInterpolatorTest.java?rev=1066171&r1=1066170&r2=1066171&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/LinearInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/LinearInterpolatorTest.java Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.NonMonotonousSequenceException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.NumberIsTooSmallException;
@@ -104,7 +103,7 @@ public class LinearInterpolatorTest {
}
@Test
- public void testIllegalArguments() throws MathException {
+ public void testIllegalArguments() {
// Data set arrays of different size.
UnivariateRealInterpolator i = new LinearInterpolator();
try {
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java?rev=1066171&r1=1066170&r2=1066171&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.analysis.MultivariateRealFunction;
import org.apache.commons.math.util.FastMath;
import org.junit.Assert;
@@ -34,7 +33,7 @@ public final class MicrosphereInterpolat
* y = 2 x<sub>1</sub> - 3 x<sub>2</sub> + 5
*/
@Test
- public void testLinearFunction2D() throws MathException {
+ public void testLinearFunction2D() {
MultivariateRealFunction f = new MultivariateRealFunction() {
public double value(double[] x) {
if (x.length != 2) {
@@ -86,7 +85,7 @@ public final class MicrosphereInterpolat
* + 4 x<sub>1</sub> x<sub>2</sub> - 5
*/
@Test
- public void testParaboloid2D() throws MathException {
+ public void testParaboloid2D() {
MultivariateRealFunction f = new MultivariateRealFunction() {
public double value(double[] x) {
if (x.length != 2) {
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java?rev=1066171&r1=1066170&r2=1066171&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.NonMonotonousSequenceException;
import org.apache.commons.math.analysis.Expm1Function;
import org.apache.commons.math.analysis.SinFunction;
@@ -46,7 +45,7 @@ public final class NevilleInterpolatorTe
* <p>
* |sin^(n)(zeta)| <= 1.0, zeta in [0, 2*PI]
*/
- public void testSinFunction() throws MathException {
+ public void testSinFunction() {
UnivariateRealFunction f = new SinFunction();
UnivariateRealInterpolator interpolator = new NevilleInterpolator();
double x[], y[], z, expected, result, tolerance;
@@ -77,7 +76,7 @@ public final class NevilleInterpolatorTe
* <p>
* |expm1^(n)(zeta)| <= e, zeta in [-1, 1]
*/
- public void testExpm1Function() throws MathException {
+ public void testExpm1Function() {
UnivariateRealFunction f = new Expm1Function();
UnivariateRealInterpolator interpolator = new NevilleInterpolator();
double x[], y[], z, expected, result, tolerance;
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=1066171&r1=1066170&r2=1066171&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 Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.util.FastMath;
@@ -34,7 +33,7 @@ public final class SmoothingPolynomialBi
* Test preconditions.
*/
@Test
- public void testPreconditions() throws MathException {
+ public void testPreconditions() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2.5};
double[][] zval = new double[xval.length][yval.length];
@@ -89,7 +88,7 @@ public final class SmoothingPolynomialBi
* z = 2 x - 3 y + 5
*/
@Test
- public void testPlane() throws MathException {
+ public void testPlane() {
BivariateRealFunction f = new BivariateRealFunction() {
public double value(double x, double y) {
return 2 * x - 3 * y + 5
@@ -137,7 +136,7 @@ public final class SmoothingPolynomialBi
* z = 2 x<sup>2</sup> - 3 y<sup>2</sup> + 4 x y - 5
*/
@Test
- public void testParaboloid() throws MathException {
+ public void testParaboloid() {
BivariateRealFunction f = new BivariateRealFunction() {
public double value(double x, double y) {
return 2 * x * x - 3 * y * y + 4 * x * y - 5
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java?rev=1066171&r1=1066170&r2=1066171&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/SplineInterpolatorTest.java Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.NonMonotonousSequenceException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.NumberIsTooSmallException;
@@ -160,7 +159,7 @@ public class SplineInterpolatorTest {
}
@Test
- public void testIllegalArguments() throws MathException {
+ public void testIllegalArguments() {
// Data set arrays of different size.
UnivariateRealInterpolator i = new SplineInterpolator();
try {
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=1066171&r1=1066170&r2=1066171&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 Tue Feb 1 19:41:34 2011
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math.analysis.interpolation;
-import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.util.FastMath;
@@ -34,7 +33,7 @@ public final class TricubicSplineInterpo
* Test preconditions.
*/
@Test
- public void testPreconditions() throws MathException {
+ public void testPreconditions() {
double[] xval = new double[] {3, 4, 5, 6.5};
double[] yval = new double[] {-4, -3, -1, 2.5};
double[] zval = new double[] {-12, -8, -5.5, -3, 0, 2.5};
@@ -98,7 +97,7 @@ public final class TricubicSplineInterpo
* f(x, y, z) = 2 x - 3 y - z + 5
*/
@Test
- public void testPlane() throws MathException {
+ public void testPlane() {
TrivariateRealFunction f = new TrivariateRealFunction() {
public double value(double x, double y, double z) {
return 2 * x - 3 * y - z + 5;
@@ -154,7 +153,7 @@ public final class TricubicSplineInterpo
* with A = 0.2, ω = 0.5, k<sub>x</sub> = 2, k<sub>y</sub> = 1.
*/
@Test
- public void testWave() throws MathException {
+ public void testWave() {
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};