From 8d8ede74b556b5d6d72ca98c2a48e0441b488b0f Mon Sep 17 00:00:00 2001 From: Sebastien Brisard Date: Wed, 6 Jun 2012 03:23:39 +0000 Subject: [PATCH] MATH-795: removed unused imports. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1346725 13f79535-47bb-0310-9956-ffa450edef68 --- .../math3/linear/ArrayRealVectorTest.java | 25 +++++++---------- .../commons/math3/linear/RealVectorTest.java | 20 +++++++------- .../math3/linear/SparseRealVectorTest.java | 27 +++++++++---------- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java b/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java index db02f5865..097705a1b 100644 --- a/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java +++ b/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java @@ -18,14 +18,9 @@ package org.apache.commons.math3.linear; import java.io.Serializable; import java.util.Iterator; -import java.util.Random; -import org.apache.commons.math3.TestUtils; import org.apache.commons.math3.analysis.UnivariateFunction; -import org.apache.commons.math3.exception.DimensionMismatchException; -import org.apache.commons.math3.exception.MathArithmeticException; import org.apache.commons.math3.exception.MathIllegalArgumentException; -import org.apache.commons.math3.util.FastMath; import org.junit.Assert; import org.junit.Test; @@ -359,6 +354,16 @@ public class ArrayRealVectorTest extends RealVectorAbstractTest { } } + @Override + public RealVector create(final double[] data) { + return new ArrayRealVector(data, true); + } + + @Override + public RealVector createAlien(double[] data) { + return new RealVectorTestImpl(data); + } + @Test public void testConstructors() { @@ -505,14 +510,4 @@ public class ArrayRealVectorTest extends RealVectorAbstractTest { Assert.assertEquals(0, new ArrayRealVector(new double[0], true).getDimension()); Assert.assertEquals(0, new ArrayRealVector(new double[0], false).getDimension()); } - - @Override - public RealVector create(final double[] data) { - return new ArrayRealVector(data, true); - } - - @Override - public RealVector createAlien(double[] data) { - return new RealVectorTestImpl(data); - } } diff --git a/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java b/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java index 35d19a73a..a04a4427d 100644 --- a/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java +++ b/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java @@ -175,6 +175,16 @@ public class RealVectorTest extends RealVectorAbstractTest{ } } + @Override + public RealVector create(final double[] data) { + return new TestVectorImpl(data); + } + + @Override + public RealVector createAlien(double[] data) { + return new TestVectorImpl(data); + } + @Override public void testBasicFunctions() { /* @@ -294,16 +304,6 @@ public class RealVectorTest extends RealVectorAbstractTest{ } } - @Override - public RealVector create(final double[] data) { - return new TestVectorImpl(data); - } - - @Override - public RealVector createAlien(double[] data) { - return new TestVectorImpl(data); - } - @Override public void testDataInOut() { /* diff --git a/src/test/java/org/apache/commons/math3/linear/SparseRealVectorTest.java b/src/test/java/org/apache/commons/math3/linear/SparseRealVectorTest.java index 0579b3c01..d5e09f906 100644 --- a/src/test/java/org/apache/commons/math3/linear/SparseRealVectorTest.java +++ b/src/test/java/org/apache/commons/math3/linear/SparseRealVectorTest.java @@ -18,14 +18,11 @@ package org.apache.commons.math3.linear; import java.io.Serializable; import java.util.Iterator; + +import org.apache.commons.math3.analysis.UnivariateFunction; import org.junit.Assert; import org.junit.Test; -import org.apache.commons.math3.TestUtils; -import org.apache.commons.math3.analysis.UnivariateFunction; -import org.apache.commons.math3.util.FastMath; -import org.apache.commons.math3.exception.MathIllegalArgumentException; - /** * Test cases for the {@link OpenMapRealVector} class. * @@ -250,6 +247,16 @@ public class SparseRealVectorTest extends RealVectorAbstractTest { } + @Override + public RealVector create(double[] data) { + return new OpenMapRealVector(data); + } + + @Override + public RealVector createAlien(double[] data) { + return new SparseRealVectorTestImpl(data); + } + @Test public void testConstructors() { @@ -314,14 +321,4 @@ public class SparseRealVectorTest extends RealVectorAbstractTest { u.ebeMultiply(v1); u.ebeDivide(v1); } - - @Override - public RealVector create(double[] data) { - return new OpenMapRealVector(data); - } - - @Override - public RealVector createAlien(double[] data) { - return new SparseRealVectorTestImpl(data); - } }