http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java b/src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java index 74bd8ee..ad58b80 100644 --- a/src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java @@ -31,7 +31,6 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.distribution.RealDistribution; import org.apache.commons.math3.distribution.UniformRealDistribution; import org.apache.commons.math3.TestUtils; - import org.junit.Test; import org.junit.Assert; @@ -39,6 +38,7 @@ import org.junit.Assert; * Test for class {@link CurveFitter} where the function to fit is a * polynomial. */ +@Deprecated public class PolynomialFitterTest { @Test public void testFit() { @@ -138,7 +138,7 @@ public class PolynomialFitterTest { final double[] init = new double[] { 0, 0 }; final int maxEval = 10000; // Trying hard to fit. - final double[] gn = doMath798(new GaussNewtonOptimizer(checker), maxEval, init); + doMath798(new GaussNewtonOptimizer(checker), maxEval, init); } /**
http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerAbstractTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerAbstractTest.java b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerAbstractTest.java index fbb6bb3..4dbe17d 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerAbstractTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerAbstractTest.java @@ -95,6 +95,7 @@ import org.junit.Test; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ +@Deprecated public abstract class AbstractLeastSquaresOptimizerAbstractTest { public abstract AbstractLeastSquaresOptimizer createOptimizer(); http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTest.java index 6b6ad12..67a2385 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTest.java @@ -17,11 +17,11 @@ import java.io.IOException; import java.util.Arrays; import org.junit.Assert; - import org.apache.commons.math3.optimization.PointVectorValuePair; import org.apache.commons.math3.util.FastMath; import org.junit.Test; +@Deprecated public class AbstractLeastSquaresOptimizerTest { public static AbstractLeastSquaresOptimizer createOptimizer() { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTestValidation.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTestValidation.java b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTestValidation.java index 34dc3dd..71898fc 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTestValidation.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizerTestValidation.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.List; import java.util.ArrayList; import java.awt.geom.Point2D; + import org.apache.commons.math3.optimization.PointVectorValuePair; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import org.apache.commons.math3.stat.descriptive.StatisticalSummary; @@ -41,6 +42,7 @@ import org.junit.Assert; * mvn test -Dtest=AbstractLeastSquaresOptimizerTestValidation -DargLine="-DmcRuns=1234 -server" * </code></pre> */ +@Deprecated public class AbstractLeastSquaresOptimizerTestValidation { private static final int MONTE_CARLO_RUNS = Integer.parseInt(System.getProperty("mcRuns", "100")); @@ -200,7 +202,6 @@ public class AbstractLeastSquaresOptimizerTestValidation { // Number of observations. final int numObs = 10; // number of parameters. - final int numParams = 2; // Create a single set of observations. final Point2D.Double[] obs = lineGenerator.generate(numObs); @@ -216,7 +217,6 @@ public class AbstractLeastSquaresOptimizerTestValidation { // Dummy optimizer (to compute the chi-square). final AbstractLeastSquaresOptimizer optim = new DummyOptimizer(); - final double[] init = { slope, offset }; // Get chi-square of the best parameters set for the given set of // observations. final double bestChi2N = getChi2N(optim, problem, regress); @@ -302,6 +302,7 @@ public class AbstractLeastSquaresOptimizerTestValidation { * A dummy optimizer. * Used for computing the covariance matrix. */ +@Deprecated class DummyOptimizer extends AbstractLeastSquaresOptimizer { public DummyOptimizer() { super(null); http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/CircleProblem.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/CircleProblem.java b/src/test/java/org/apache/commons/math3/optimization/general/CircleProblem.java index 5e2bb76..feca13e 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/CircleProblem.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/CircleProblem.java @@ -38,6 +38,7 @@ import org.apache.commons.math3.util.FastMath; * corresponding circle.</li> * </ul> */ +@Deprecated class CircleProblem implements MultivariateDifferentiableVectorFunction { /** Cloud of points assumed to be fitted by a circle. */ private final ArrayList<Vector2D> points; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/CircleScalar.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/CircleScalar.java b/src/test/java/org/apache/commons/math3/optimization/general/CircleScalar.java index c33965f..6b39b41 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/CircleScalar.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/CircleScalar.java @@ -26,6 +26,7 @@ import org.apache.commons.math3.geometry.euclidean.twod.Vector2D; /** * Class used in the tests. */ +@Deprecated public class CircleScalar implements MultivariateDifferentiableFunction { private ArrayList<Vector2D> points; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/CircleVectorial.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/CircleVectorial.java b/src/test/java/org/apache/commons/math3/optimization/general/CircleVectorial.java index 88de7fb..7d79e56 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/CircleVectorial.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/CircleVectorial.java @@ -26,6 +26,7 @@ import org.apache.commons.math3.geometry.euclidean.twod.Vector2D; /** * Class used in the tests. */ +@Deprecated class CircleVectorial implements MultivariateDifferentiableVectorFunction { private ArrayList<Vector2D> points; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/GaussNewtonOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/GaussNewtonOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/general/GaussNewtonOptimizerTest.java index ba81179..c987e14 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/GaussNewtonOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/GaussNewtonOptimizerTest.java @@ -86,6 +86,7 @@ import org.junit.Test; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ +@Deprecated public class GaussNewtonOptimizerTest extends AbstractLeastSquaresOptimizerAbstractTest { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java index e949a4b..81c2c52 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java @@ -97,6 +97,7 @@ import org.junit.Ignore; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ +@Deprecated public class LevenbergMarquardtOptimizerTest extends AbstractLeastSquaresOptimizerAbstractTest { @Override http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/MinpackTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/MinpackTest.java b/src/test/java/org/apache/commons/math3/optimization/general/MinpackTest.java index e39b32d..63432f7 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/MinpackTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/MinpackTest.java @@ -20,7 +20,6 @@ package org.apache.commons.math3.optimization.general; import java.io.Serializable; import java.util.Arrays; - import org.apache.commons.math3.exception.TooManyEvaluationsException; import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.analysis.differentiation.MultivariateDifferentiableVectorFunction; @@ -91,6 +90,7 @@ import org.junit.Test; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ +@Deprecated public class MinpackTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizerTest.java index 4665c79..26091a4 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizerTest.java @@ -93,6 +93,7 @@ import org.junit.Test; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ +@Deprecated public class NonLinearConjugateGradientOptimizerTest { @Test public void testTrivial() { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/RandomCirclePointGenerator.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/RandomCirclePointGenerator.java b/src/test/java/org/apache/commons/math3/optimization/general/RandomCirclePointGenerator.java index 155f492..86f8272 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/RandomCirclePointGenerator.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/RandomCirclePointGenerator.java @@ -29,6 +29,7 @@ import org.apache.commons.math3.geometry.euclidean.twod.Vector2D; /** * Factory for generating a cloud of points that approximate a circle. */ +@Deprecated public class RandomCirclePointGenerator { /** RNG for the x-coordinate of the center. */ private final RealDistribution cX; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/RandomStraightLinePointGenerator.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/RandomStraightLinePointGenerator.java b/src/test/java/org/apache/commons/math3/optimization/general/RandomStraightLinePointGenerator.java index a7f6eb6..db626e8 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/RandomStraightLinePointGenerator.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/RandomStraightLinePointGenerator.java @@ -18,6 +18,7 @@ package org.apache.commons.math3.optimization.general; import java.awt.geom.Point2D; + import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.Well44497b; import org.apache.commons.math3.distribution.RealDistribution; @@ -27,6 +28,7 @@ import org.apache.commons.math3.distribution.NormalDistribution; /** * Factory for generating a cloud of points that approximate a straight line. */ +@Deprecated public class RandomStraightLinePointGenerator { /** Slope. */ private final double slope; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDataset.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDataset.java b/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDataset.java index 739acfd..1b6c440 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDataset.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDataset.java @@ -31,6 +31,7 @@ import org.apache.commons.math3.util.MathArrays; * Instances of this class can be created by invocation of the * {@link StatisticalReferenceDatasetFactory}. */ +@Deprecated public abstract class StatisticalReferenceDataset { /** The name of this dataset. */ http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDatasetFactory.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDatasetFactory.java b/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDatasetFactory.java index 0103b4b..167c856 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDatasetFactory.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/StatisticalReferenceDatasetFactory.java @@ -27,6 +27,7 @@ import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; * A factory to create instances of {@link StatisticalReferenceDataset} from * available resources. */ +@Deprecated public class StatisticalReferenceDatasetFactory { private StatisticalReferenceDatasetFactory() { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/general/StraightLineProblem.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/general/StraightLineProblem.java b/src/test/java/org/apache/commons/math3/optimization/general/StraightLineProblem.java index bfc703d..1b7d933 100644 --- a/src/test/java/org/apache/commons/math3/optimization/general/StraightLineProblem.java +++ b/src/test/java/org/apache/commons/math3/optimization/general/StraightLineProblem.java @@ -36,6 +36,7 @@ import org.apache.commons.math3.stat.regression.SimpleRegression; * <li>for each pair (a, b), the y-coordinate of the line.</li> * </ul> */ +@Deprecated class StraightLineProblem implements MultivariateDifferentiableVectorFunction { /** Cloud of points assumed to be fitted by a straight line. */ private final ArrayList<double[]> points; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java b/src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java index ad4f2fe..110992a 100644 --- a/src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java @@ -28,6 +28,7 @@ import org.apache.commons.math3.optimization.PointValuePair; import org.apache.commons.math3.util.Precision; import org.junit.Test; +@Deprecated public class SimplexSolverTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/linear/SimplexTableauTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/linear/SimplexTableauTest.java b/src/test/java/org/apache/commons/math3/optimization/linear/SimplexTableauTest.java index efbef43..7fad943 100644 --- a/src/test/java/org/apache/commons/math3/optimization/linear/SimplexTableauTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/linear/SimplexTableauTest.java @@ -25,6 +25,7 @@ import org.apache.commons.math3.optimization.GoalType; import org.junit.Assert; import org.junit.Test; +@Deprecated public class SimplexTableauTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/univariate/BracketFinderTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/univariate/BracketFinderTest.java b/src/test/java/org/apache/commons/math3/optimization/univariate/BracketFinderTest.java index 465efbb..b5783c2 100644 --- a/src/test/java/org/apache/commons/math3/optimization/univariate/BracketFinderTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/univariate/BracketFinderTest.java @@ -18,13 +18,13 @@ package org.apache.commons.math3.optimization.univariate; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.optimization.GoalType; - import org.junit.Assert; import org.junit.Test; /** * Test for {@link BracketFinder}. */ +@Deprecated public class BracketFinderTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java index ed3724e..34ee8c7 100644 --- a/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java @@ -34,6 +34,7 @@ import org.junit.Test; /** */ +@Deprecated public final class BrentOptimizerTest { @Test @@ -207,7 +208,6 @@ public final class BrentOptimizerTest { minSin - 6.789 * delta, minSin + 9.876 * delta, init); - final int numEval = optimizer.getEvaluations(); final double sol = result.getPoint(); final double expected = init; @@ -239,7 +239,6 @@ public final class BrentOptimizerTest { = optimizer.optimize(200, f, GoalType.MINIMIZE, minSin - 6.789 * delta, minSin + 9.876 * delta); - final int numEval = optimizer.getEvaluations(); final double sol = result.getPoint(); final double expected = 4.712389027602411; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueCheckerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueCheckerTest.java b/src/test/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueCheckerTest.java index c10a26f..8ad9f66 100644 --- a/src/test/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueCheckerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueCheckerTest.java @@ -20,6 +20,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.junit.Test; import org.junit.Assert; +@Deprecated public class SimpleUnivariateValueCheckerTest { @Test(expected=NotStrictlyPositiveException.class) public void testIterationCheckPrecondition() { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java b/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java index b8e1d22..18fbdab 100644 --- a/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java +++ b/src/test/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizerTest.java @@ -26,6 +26,7 @@ import org.apache.commons.math3.util.FastMath; import org.junit.Assert; import org.junit.Test; +@Deprecated public class UnivariateMultiStartOptimizerTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java b/src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java index 98ee7dd..42e9a7f 100644 --- a/src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java +++ b/src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java @@ -28,14 +28,12 @@ import org.apache.commons.math3.TestUtils; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator; import org.apache.commons.math3.analysis.integration.IterativeLegendreGaussIntegrator; -import org.apache.commons.math3.distribution.AbstractRealDistribution; import org.apache.commons.math3.distribution.ConstantRealDistribution; import org.apache.commons.math3.distribution.NormalDistribution; import org.apache.commons.math3.distribution.RealDistribution; import org.apache.commons.math3.distribution.RealDistributionAbstractTest; import org.apache.commons.math3.distribution.UniformRealDistribution; import org.apache.commons.math3.exception.NullArgumentException; -import org.apache.commons.math3.exception.OutOfRangeException; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import org.apache.commons.math3.util.FastMath; import org.junit.Assert; http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/special/BetaTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/special/BetaTest.java b/src/test/java/org/apache/commons/math3/special/BetaTest.java index 5c5b3ca..d313639 100644 --- a/src/test/java/org/apache/commons/math3/special/BetaTest.java +++ b/src/test/java/org/apache/commons/math3/special/BetaTest.java @@ -147,7 +147,7 @@ public class BetaTest { final double b = 223; try { - final double r = Beta.regularizedBeta(x, a, b, 1e-14, 10000); + Beta.regularizedBeta(x, a, b, 1e-14, 10000); } catch (StackOverflowError error) { Assert.fail("Infinite recursion"); } http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/stat/clustering/DBSCANClustererTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/stat/clustering/DBSCANClustererTest.java b/src/test/java/org/apache/commons/math3/stat/clustering/DBSCANClustererTest.java index 91f881e..657e2de 100644 --- a/src/test/java/org/apache/commons/math3/stat/clustering/DBSCANClustererTest.java +++ b/src/test/java/org/apache/commons/math3/stat/clustering/DBSCANClustererTest.java @@ -24,6 +24,7 @@ import org.apache.commons.math3.exception.NullArgumentException; import org.junit.Assert; import org.junit.Test; +@Deprecated public class DBSCANClustererTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanDoublePointTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanDoublePointTest.java b/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanDoublePointTest.java index bd9fb11..8c37594 100644 --- a/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanDoublePointTest.java +++ b/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanDoublePointTest.java @@ -24,6 +24,7 @@ import org.apache.commons.math3.util.FastMath; import org.junit.Assert; import org.junit.Test; +@Deprecated public class EuclideanDoublePointTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanIntegerPointTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanIntegerPointTest.java b/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanIntegerPointTest.java index 15d3ab6..038f8a8 100644 --- a/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanIntegerPointTest.java +++ b/src/test/java/org/apache/commons/math3/stat/clustering/EuclideanIntegerPointTest.java @@ -26,6 +26,7 @@ import org.apache.commons.math3.util.FastMath; import org.junit.Assert; import org.junit.Test; +@Deprecated public class EuclideanIntegerPointTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/stat/clustering/KMeansPlusPlusClustererTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/stat/clustering/KMeansPlusPlusClustererTest.java b/src/test/java/org/apache/commons/math3/stat/clustering/KMeansPlusPlusClustererTest.java index 5c7f617..d14f77b 100644 --- a/src/test/java/org/apache/commons/math3/stat/clustering/KMeansPlusPlusClustererTest.java +++ b/src/test/java/org/apache/commons/math3/stat/clustering/KMeansPlusPlusClustererTest.java @@ -28,6 +28,7 @@ import org.apache.commons.math3.exception.NumberIsTooSmallException; import org.junit.Assert; import org.junit.Test; +@Deprecated public class KMeansPlusPlusClustererTest { @Test http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/util/MathUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/util/MathUtilsTest.java b/src/test/java/org/apache/commons/math3/util/MathUtilsTest.java index 6c95f2f..2089bf5 100644 --- a/src/test/java/org/apache/commons/math3/util/MathUtilsTest.java +++ b/src/test/java/org/apache/commons/math3/util/MathUtilsTest.java @@ -19,7 +19,7 @@ import org.apache.commons.math3.exception.MathArithmeticException; import org.apache.commons.math3.exception.NotFiniteNumberException; import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.random.RandomDataImpl; +import org.apache.commons.math3.random.RandomDataGenerator; import org.junit.Assert; import org.junit.Test; @@ -94,7 +94,7 @@ public final class MathUtilsTest { public void testPermutedArrayHash() { double[] original = new double[10]; double[] permuted = new double[10]; - RandomDataImpl random = new RandomDataImpl(); + RandomDataGenerator random = new RandomDataGenerator(); // Generate 10 distinct random values for (int i = 0; i < 10; i++) { http://git-wip-us.apache.org/repos/asf/commons-math/blob/e875e6d5/src/test/java/org/apache/commons/math3/util/ResizableDoubleArrayTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/util/ResizableDoubleArrayTest.java b/src/test/java/org/apache/commons/math3/util/ResizableDoubleArrayTest.java index f00c3de..6d9d244 100644 --- a/src/test/java/org/apache/commons/math3/util/ResizableDoubleArrayTest.java +++ b/src/test/java/org/apache/commons/math3/util/ResizableDoubleArrayTest.java @@ -46,14 +46,14 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { @Test public void testConstructors() { float defaultExpansionFactor = 2.0f; - float defaultContractionCriteria = 2.5f; + double defaultContractionCriteria = 2.5; int defaultMode = ResizableDoubleArray.MULTIPLICATIVE_MODE; ResizableDoubleArray testDa = new ResizableDoubleArray(2); Assert.assertEquals(0, testDa.getNumElements()); Assert.assertEquals(2, testDa.getCapacity()); Assert.assertEquals(defaultExpansionFactor, testDa.getExpansionFactor(), 0); - Assert.assertEquals(defaultContractionCriteria, testDa.getContractionCriteria(), 0); + Assert.assertEquals(defaultContractionCriteria, testDa.getContractionCriterion(), 0); Assert.assertEquals(defaultMode, testDa.getExpansionMode()); try { da = new ResizableDoubleArray(-1); @@ -69,44 +69,44 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { testDa = new ResizableDoubleArray(initialArray); Assert.assertEquals(3, testDa.getNumElements()); - testDa = new ResizableDoubleArray(2, 2.0f); + testDa = new ResizableDoubleArray(2, 2.0); Assert.assertEquals(0, testDa.getNumElements()); Assert.assertEquals(2, testDa.getCapacity()); Assert.assertEquals(defaultExpansionFactor, testDa.getExpansionFactor(), 0); - Assert.assertEquals(defaultContractionCriteria, testDa.getContractionCriteria(), 0); + Assert.assertEquals(defaultContractionCriteria, testDa.getContractionCriterion(), 0); Assert.assertEquals(defaultMode, testDa.getExpansionMode()); try { - da = new ResizableDoubleArray(2, 0.5f); + da = new ResizableDoubleArray(2, 0.5); Assert.fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } - testDa = new ResizableDoubleArray(2, 3.0f); + testDa = new ResizableDoubleArray(2, 3.0); Assert.assertEquals(3.0f, testDa.getExpansionFactor(), 0); - Assert.assertEquals(3.5f, testDa.getContractionCriteria(), 0); + Assert.assertEquals(3.5f, testDa.getContractionCriterion(), 0); - testDa = new ResizableDoubleArray(2, 2.0f, 3.0f); + testDa = new ResizableDoubleArray(2, 2.0, 3.0); Assert.assertEquals(0, testDa.getNumElements()); Assert.assertEquals(2, testDa.getCapacity()); Assert.assertEquals(defaultExpansionFactor, testDa.getExpansionFactor(), 0); - Assert.assertEquals(3.0f, testDa.getContractionCriteria(), 0); + Assert.assertEquals(3.0f, testDa.getContractionCriterion(), 0); Assert.assertEquals(defaultMode, testDa.getExpansionMode()); try { - da = new ResizableDoubleArray(2, 2.0f, 1.5f); + da = new ResizableDoubleArray(2, 2.0, 1.5); Assert.fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } - testDa = new ResizableDoubleArray(2, 2.0f, 3.0f, - ResizableDoubleArray.ADDITIVE_MODE); + testDa = new ResizableDoubleArray(2, 2.0, 3.0, + ResizableDoubleArray.ExpansionMode.ADDITIVE); Assert.assertEquals(0, testDa.getNumElements()); Assert.assertEquals(2, testDa.getCapacity()); Assert.assertEquals(defaultExpansionFactor, testDa.getExpansionFactor(), 0); - Assert.assertEquals(3.0f, testDa.getContractionCriteria(), 0); + Assert.assertEquals(3.0f, testDa.getContractionCriterion(), 0); Assert.assertEquals(ResizableDoubleArray.ADDITIVE_MODE, testDa.getExpansionMode()); @@ -118,8 +118,8 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { } // Copy constructor - testDa = new ResizableDoubleArray(2, 2.0f, 3.0f, - ResizableDoubleArray.ADDITIVE_MODE); + testDa = new ResizableDoubleArray(2, 2.0, 3.0, + ResizableDoubleArray.ExpansionMode.ADDITIVE); testDa.addElement(2.0); testDa.addElement(3.2); ResizableDoubleArray copyDa = new ResizableDoubleArray(testDa); @@ -179,8 +179,8 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { // ADDITIVE_MODE - ResizableDoubleArray testDa = new ResizableDoubleArray(2, 2.0f, 3.0f, - ResizableDoubleArray.ADDITIVE_MODE); + ResizableDoubleArray testDa = new ResizableDoubleArray(2, 2.0, 3.0, + ResizableDoubleArray.ExpansionMode.ADDITIVE); Assert.assertEquals(2, testDa.getCapacity()); testDa.addElement(1d); testDa.addElement(1d); @@ -213,8 +213,8 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { Assert.assertEquals(6, testDa.getNumElements()); // ADDITIVE_MODE (x's are occupied storage locations, 0's are open) - testDa = new ResizableDoubleArray(2, 2.0f, 2.5f, - ResizableDoubleArray.ADDITIVE_MODE); + testDa = new ResizableDoubleArray(2, 2.0, 2.5, + ResizableDoubleArray.ExpansionMode.ADDITIVE); Assert.assertEquals(2, testDa.getCapacity()); testDa.addElements(new double[] { 1d }); // x,0 testDa.addElements(new double[] { 2d }); // x,x @@ -248,8 +248,8 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { Assert.assertEquals(6, da.getElement(2), 0); // ADDITIVE_MODE (x's are occupied storage locations, 0's are open) - ResizableDoubleArray testDa = new ResizableDoubleArray(2, 2.0f, 2.5f, - ResizableDoubleArray.ADDITIVE_MODE); + ResizableDoubleArray testDa = new ResizableDoubleArray(2, 2.0, 2.5, + ResizableDoubleArray.ExpansionMode.ADDITIVE); Assert.assertEquals(2, testDa.getCapacity()); testDa.addElement(1d); // x,0 testDa.addElement(2d); // x,x @@ -334,7 +334,7 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { @Test public void testWithInitialCapacityAndExpansionFactor() { - ResizableDoubleArray eDA3 = new ResizableDoubleArray(3, 3.0f, 3.5f); + ResizableDoubleArray eDA3 = new ResizableDoubleArray(3, 3.0, 3.5); Assert.assertEquals("Initial number of elements should be 0", 0, eDA3.getNumElements() ); final IntegerDistribution randomData = new UniformIntegerDistribution(100, 3000); @@ -442,7 +442,7 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { @Test public void testMutators() { ((ResizableDoubleArray)da).setContractionCriteria(10f); - Assert.assertEquals(10f, ((ResizableDoubleArray)da).getContractionCriteria(), 0); + Assert.assertEquals(10f, ((ResizableDoubleArray)da).getContractionCriterion(), 0); ((ResizableDoubleArray)da).setExpansionFactor(8f); Assert.assertEquals(8f, ((ResizableDoubleArray)da).getExpansionFactor(), 0); try { @@ -483,10 +483,10 @@ public class ResizableDoubleArrayTest extends DoubleArrayAbstractTest { verifyEquality(first, second); // Equals iff same data, same properties - ResizableDoubleArray third = new ResizableDoubleArray(3, 2.0f, 2.0f); + ResizableDoubleArray third = new ResizableDoubleArray(3, 2.0, 2.0); verifyInequality(third, first); - ResizableDoubleArray fourth = new ResizableDoubleArray(3, 2.0f, 2.0f); - ResizableDoubleArray fifth = new ResizableDoubleArray(2, 2.0f, 2.0f); + ResizableDoubleArray fourth = new ResizableDoubleArray(3, 2.0, 2.0); + ResizableDoubleArray fifth = new ResizableDoubleArray(2, 2.0, 2.0); verifyEquality(third, fourth); verifyInequality(third, fifth); third.addElement(4.1);
