diff --git a/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java b/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java index c6ab28cde..93dfe1199 100644 --- a/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java +++ b/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java @@ -952,9 +952,7 @@ public class SparseRealVectorTest { v1.setEntry(1, 3); v1.setEntry(2, 0); - RealVector w; - - w = u.ebeMultiply(v1); - w = u.ebeDivide(v1); + u.ebeMultiply(v1); + u.ebeDivide(v1); } } diff --git a/src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java b/src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java index 1220fbde0..1a1659e5f 100644 --- a/src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java +++ b/src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java @@ -58,7 +58,6 @@ public class BOBYQAOptimizerTest { @Test(expected=NumberIsTooSmallException.class) public void testProblemDimensionTooSmall() { double[] startPoint = point(1, 0.5); - double[][] boundaries = null; doTest(new Rosen(), startPoint, null, GoalType.MINIMIZE, 1e-13, 1e-6, 2000, null); @@ -429,7 +428,7 @@ public class BOBYQAOptimizerTest { } private static class DiffPow implements MultivariateRealFunction { - private int fcount = 0; +// private int fcount = 0; public double value(double[] x) { double f = 0; for (int i = 0; i < x.length; ++i) diff --git a/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java b/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java index 84eef5dd4..d85e75952 100644 --- a/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java +++ b/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java @@ -211,13 +211,12 @@ public class LevenbergMarquardtOptimizerTest { }, new double[] { 1, 1, 1 }); LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer(); - VectorialPointValuePair optimum - = optimizer.optimize(100, problem, problem.target, - new double[] { 1, 1, 1 }, - new double[] { 0, 0, 0 }); + optimizer.optimize(100, problem, problem.target, + new double[] { 1, 1, 1 }, + new double[] { 0, 0, 0 }); Assert.assertTrue(FastMath.sqrt(problem.target.length) * optimizer.getRMS() > 0.6); - final double[][] m = optimizer.getCovariances(); + optimizer.getCovariances(); } @Test diff --git a/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java b/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java index f9931f9be..30d12baa4 100644 --- a/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java +++ b/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java @@ -94,7 +94,7 @@ public class StableRandomGeneratorTest extends TestCase { */ public void testAlphaRangeBelowZero() { try { - StableRandomGenerator generator = new StableRandomGenerator(rg, + new StableRandomGenerator(rg, -1.0, 0.0); } catch (OutOfRangeException e) { assertEquals(-1.0, e.getArgument()); @@ -103,7 +103,7 @@ public class StableRandomGeneratorTest extends TestCase { public void testAlphaRangeAboveTwo() { try { - StableRandomGenerator generator = new StableRandomGenerator(rg, + new StableRandomGenerator(rg, 3.0, 0.0); } catch (OutOfRangeException e) { assertEquals(3.0, e.getArgument()); @@ -112,7 +112,7 @@ public class StableRandomGeneratorTest extends TestCase { public void testBetaRangeBelowMinusOne() { try { - StableRandomGenerator generator = new StableRandomGenerator(rg, + new StableRandomGenerator(rg, 1.0, -2.0); } catch (OutOfRangeException e) { assertEquals(-2.0, e.getArgument()); @@ -121,7 +121,7 @@ public class StableRandomGeneratorTest extends TestCase { public void testBetaRangeAboveOne() { try { - StableRandomGenerator generator = new StableRandomGenerator(rg, + new StableRandomGenerator(rg, 1.0, 2.0); } catch (OutOfRangeException e) { assertEquals(2.0, e.getArgument());