From 4f17b718b3a821885335c285b7fbdd07384a3e18 Mon Sep 17 00:00:00 2001 From: "Mark R. Diggory" Date: Sun, 22 Jun 2003 03:57:57 +0000 Subject: [PATCH] Initial commit of package refactorings discussed in the group. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140942 13f79535-47bb-0310-9956-ffa450edef68 --- .../{ => analysis}/ConvergenceException.java | 2 +- .../math/{ => analysis}/RootFinding.java | 2 +- .../{ => analysis}/UnivariateFunction.java | 2 +- .../apache/commons/math/analysis/package.html | 5 +++++ .../AbstractContinuousDistribution.java | 4 ++-- .../commons/math/distribution/package.html | 5 +++++ .../commons/math/{ => linear}/RealMatrix.java | 4 ++-- .../math/{ => linear}/RealMatrixImpl.java | 4 ++-- .../apache/commons/math/linear/package.html | 5 +++++ .../{ => random}/EmpiricalDistribution.java | 4 ++-- .../EmpiricalDistributionImpl.java | 4 ++-- .../commons/math/{ => random}/RandomData.java | 4 ++-- .../math/{ => random}/RandomDataImpl.java | 4 ++-- .../math/{ => random}/ValueServer.java | 4 ++-- .../apache/commons/math/random/package.html | 5 +++++ .../org/apache/commons/math/special/Beta.java | 2 +- .../apache/commons/math/special/Gamma.java | 2 +- .../apache/commons/math/special/package.html | 5 +++++ .../math/stat/BeanListUnivariateImpl.java | 2 -- .../math/{Freq.java => stat/Frequency.java} | 8 +++---- .../commons/math/stat/ListUnivariateImpl.java | 1 - .../math/stat/StoreUnivariateImpl.java | 4 ++-- .../commons/math/stat/UnivariateImpl.java | 6 +++--- .../org/apache/commons/math/stat/package.html | 5 +++++ .../math/{ => util}/ContinuedFraction.java | 4 +++- .../{ => util}/ContractableDoubleArray.java | 2 +- .../commons/math/{ => util}/DoubleArray.java | 3 +-- .../{ => util}/ExpandableDoubleArray.java | 2 +- .../math/{ => util}/FixedDoubleArray.java | 2 +- .../commons/math/{ => util}/MathUtils.java | 4 ++-- .../org/apache/commons/math/util/package.html | 5 +++++ .../math/{ => linear}/RealMatrixImplTest.java | 4 ++-- .../EmpiricalDistributionTest.java | 5 ++--- .../math/{ => random}/RandomDataTest.java | 21 +++++++++---------- .../math/{ => random}/ValueServerTest.java | 5 ++--- .../commons/math/{ => random}/testData.txt | 0 .../math/stat/BeanListUnivariateImplTest.java | 4 ++-- .../FrequencyTest.java} | 18 ++++++++-------- .../math/stat/ListUnivariateImplTest.java | 4 ++-- .../math/stat/StoreUnivariateImplTest.java | 9 ++++---- .../commons/math/stat/UnivariateImplTest.java | 4 ++-- .../{ => util}/ContinuedFractionTest.java | 2 +- .../ContractableDoubleArrayTest.java | 2 +- .../{ => util}/DoubleArrayAbstractTest.java | 2 +- .../{ => util}/ExpandableDoubleArrayTest.java | 2 +- .../math/{ => util}/FixedDoubleArrayTest.java | 2 +- .../math/{ => util}/MathUtilsTest.java | 5 ++--- 47 files changed, 117 insertions(+), 87 deletions(-) rename src/java/org/apache/commons/math/{ => analysis}/ConvergenceException.java (98%) rename src/java/org/apache/commons/math/{ => analysis}/RootFinding.java (99%) rename src/java/org/apache/commons/math/{ => analysis}/UnivariateFunction.java (98%) create mode 100644 src/java/org/apache/commons/math/analysis/package.html create mode 100644 src/java/org/apache/commons/math/distribution/package.html rename src/java/org/apache/commons/math/{ => linear}/RealMatrix.java (98%) rename src/java/org/apache/commons/math/{ => linear}/RealMatrixImpl.java (99%) create mode 100644 src/java/org/apache/commons/math/linear/package.html rename src/java/org/apache/commons/math/{ => random}/EmpiricalDistribution.java (99%) rename src/java/org/apache/commons/math/{ => random}/EmpiricalDistributionImpl.java (99%) rename src/java/org/apache/commons/math/{ => random}/RandomData.java (99%) rename src/java/org/apache/commons/math/{ => random}/RandomDataImpl.java (99%) rename src/java/org/apache/commons/math/{ => random}/ValueServer.java (99%) create mode 100644 src/java/org/apache/commons/math/random/package.html create mode 100644 src/java/org/apache/commons/math/special/package.html rename src/java/org/apache/commons/math/{Freq.java => stat/Frequency.java} (97%) create mode 100644 src/java/org/apache/commons/math/stat/package.html rename src/java/org/apache/commons/math/{ => util}/ContinuedFraction.java (98%) rename src/java/org/apache/commons/math/{ => util}/ContractableDoubleArray.java (99%) rename src/java/org/apache/commons/math/{ => util}/DoubleArray.java (98%) rename src/java/org/apache/commons/math/{ => util}/ExpandableDoubleArray.java (99%) rename src/java/org/apache/commons/math/{ => util}/FixedDoubleArray.java (99%) rename src/java/org/apache/commons/math/{ => util}/MathUtils.java (99%) create mode 100644 src/java/org/apache/commons/math/util/package.html rename src/test/org/apache/commons/math/{ => linear}/RealMatrixImplTest.java (99%) rename src/test/org/apache/commons/math/{ => random}/EmpiricalDistributionTest.java (97%) rename src/test/org/apache/commons/math/{ => random}/RandomDataTest.java (98%) rename src/test/org/apache/commons/math/{ => random}/ValueServerTest.java (98%) rename src/test/org/apache/commons/math/{ => random}/testData.txt (100%) rename src/test/org/apache/commons/math/{FreqTest.java => stat/FrequencyTest.java} (90%) rename src/test/org/apache/commons/math/{ => util}/ContinuedFractionTest.java (98%) rename src/test/org/apache/commons/math/{ => util}/ContractableDoubleArrayTest.java (98%) rename src/test/org/apache/commons/math/{ => util}/DoubleArrayAbstractTest.java (99%) rename src/test/org/apache/commons/math/{ => util}/ExpandableDoubleArrayTest.java (99%) rename src/test/org/apache/commons/math/{ => util}/FixedDoubleArrayTest.java (99%) rename src/test/org/apache/commons/math/{ => util}/MathUtilsTest.java (98%) diff --git a/src/java/org/apache/commons/math/ConvergenceException.java b/src/java/org/apache/commons/math/analysis/ConvergenceException.java similarity index 98% rename from src/java/org/apache/commons/math/ConvergenceException.java rename to src/java/org/apache/commons/math/analysis/ConvergenceException.java index 46171551a..2e86e0377 100644 --- a/src/java/org/apache/commons/math/ConvergenceException.java +++ b/src/java/org/apache/commons/math/analysis/ConvergenceException.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.analysis; /** * Error thrown when a numerical computation can not be performed because the diff --git a/src/java/org/apache/commons/math/RootFinding.java b/src/java/org/apache/commons/math/analysis/RootFinding.java similarity index 99% rename from src/java/org/apache/commons/math/RootFinding.java rename to src/java/org/apache/commons/math/analysis/RootFinding.java index 64abcc48e..0c7de3f7c 100644 --- a/src/java/org/apache/commons/math/RootFinding.java +++ b/src/java/org/apache/commons/math/analysis/RootFinding.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.analysis; /** * Utility class comprised of root finding techniques. diff --git a/src/java/org/apache/commons/math/UnivariateFunction.java b/src/java/org/apache/commons/math/analysis/UnivariateFunction.java similarity index 98% rename from src/java/org/apache/commons/math/UnivariateFunction.java rename to src/java/org/apache/commons/math/analysis/UnivariateFunction.java index e7214a80b..3c9f66295 100644 --- a/src/java/org/apache/commons/math/UnivariateFunction.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateFunction.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.analysis; /** * @author Brent Worden diff --git a/src/java/org/apache/commons/math/analysis/package.html b/src/java/org/apache/commons/math/analysis/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/analysis/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java index ce3276614..9003ef393 100644 --- a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java +++ b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java @@ -53,8 +53,8 @@ */ package org.apache.commons.math.stat.distribution; -import org.apache.commons.math.RootFinding; -import org.apache.commons.math.UnivariateFunction; +import org.apache.commons.math.analysis.RootFinding; +import org.apache.commons.math.analysis.UnivariateFunction; /** * Base class for various continuous distributions. It provides default diff --git a/src/java/org/apache/commons/math/distribution/package.html b/src/java/org/apache/commons/math/distribution/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/distribution/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/RealMatrix.java b/src/java/org/apache/commons/math/linear/RealMatrix.java similarity index 98% rename from src/java/org/apache/commons/math/RealMatrix.java rename to src/java/org/apache/commons/math/linear/RealMatrix.java index 7b93f164b..0174f7a0c 100644 --- a/src/java/org/apache/commons/math/RealMatrix.java +++ b/src/java/org/apache/commons/math/linear/RealMatrix.java @@ -52,12 +52,12 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.linear; /** * Interface defining a real-valued matrix with basic algebraic operations * @author Phil Steitz - * @version $Revision: 1.4 $ $Date: 2003/06/15 17:01:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:57 $ */ public interface RealMatrix { diff --git a/src/java/org/apache/commons/math/RealMatrixImpl.java b/src/java/org/apache/commons/math/linear/RealMatrixImpl.java similarity index 99% rename from src/java/org/apache/commons/math/RealMatrixImpl.java rename to src/java/org/apache/commons/math/linear/RealMatrixImpl.java index c87d8c3e6..6bdb61876 100644 --- a/src/java/org/apache/commons/math/RealMatrixImpl.java +++ b/src/java/org/apache/commons/math/linear/RealMatrixImpl.java @@ -52,7 +52,7 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.linear; import java.io.Serializable; /** @@ -79,7 +79,7 @@ import java.io.Serializable; * before using any of the methods above. * * @author Phil Steitz - * @version $Revision: 1.4 $ $Date: 2003/06/15 17:01:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:57 $ */ public class RealMatrixImpl implements RealMatrix, Serializable { diff --git a/src/java/org/apache/commons/math/linear/package.html b/src/java/org/apache/commons/math/linear/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/linear/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/EmpiricalDistribution.java b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java similarity index 99% rename from src/java/org/apache/commons/math/EmpiricalDistribution.java rename to src/java/org/apache/commons/math/random/EmpiricalDistribution.java index e4668ed6b..b6b56a53c 100644 --- a/src/java/org/apache/commons/math/EmpiricalDistribution.java +++ b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java @@ -52,7 +52,7 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import java.io.IOException; import java.io.File; @@ -81,7 +81,7 @@ import org.apache.commons.math.stat.Univariate; * generate random values "like" those in the input file -- i.e., the values * generated will follow the distribution of the values in the file. * @author Phil Steitz - * @version $Revision: 1.4 $ + * @version $Revision: 1.1 $ */ public interface EmpiricalDistribution { diff --git a/src/java/org/apache/commons/math/EmpiricalDistributionImpl.java b/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java similarity index 99% rename from src/java/org/apache/commons/math/EmpiricalDistributionImpl.java rename to src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java index b9ce6f107..10ad26fb7 100644 --- a/src/java/org/apache/commons/math/EmpiricalDistributionImpl.java +++ b/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java @@ -52,7 +52,7 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import java.util.ArrayList; import java.io.Serializable; @@ -90,7 +90,7 @@ import org.apache.commons.math.stat.UnivariateImpl; *

* * @author Phil Steitz - * @version $Revision: 1.4 $ + * @version $Revision: 1.1 $ */ public class EmpiricalDistributionImpl implements Serializable,EmpiricalDistribution { diff --git a/src/java/org/apache/commons/math/RandomData.java b/src/java/org/apache/commons/math/random/RandomData.java similarity index 99% rename from src/java/org/apache/commons/math/RandomData.java rename to src/java/org/apache/commons/math/random/RandomData.java index 938e64a23..2ed1144d8 100644 --- a/src/java/org/apache/commons/math/RandomData.java +++ b/src/java/org/apache/commons/math/random/RandomData.java @@ -52,13 +52,13 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import java.util.Collection; /** * Random data generation utilities * @author Phil Steitz - * @version $Revision: 1.3 $ $Date: 2003/06/04 02:45:49 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:57 $ */ public interface RandomData { /** diff --git a/src/java/org/apache/commons/math/RandomDataImpl.java b/src/java/org/apache/commons/math/random/RandomDataImpl.java similarity index 99% rename from src/java/org/apache/commons/math/RandomDataImpl.java rename to src/java/org/apache/commons/math/random/RandomDataImpl.java index a254e5d26..a747db0be 100644 --- a/src/java/org/apache/commons/math/RandomDataImpl.java +++ b/src/java/org/apache/commons/math/random/RandomDataImpl.java @@ -52,7 +52,7 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import java.security.MessageDigest; import java.security.SecureRandom; @@ -105,7 +105,7 @@ import java.util.Collection; * identical). * * @author Phil Steitz - * @version $Revision: 1.5 $ $Date: 2003/06/11 14:50:29 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:57 $ */ public class RandomDataImpl implements RandomData { diff --git a/src/java/org/apache/commons/math/ValueServer.java b/src/java/org/apache/commons/math/random/ValueServer.java similarity index 99% rename from src/java/org/apache/commons/math/ValueServer.java rename to src/java/org/apache/commons/math/random/ValueServer.java index 180d227fc..6f6fa94be 100644 --- a/src/java/org/apache/commons/math/ValueServer.java +++ b/src/java/org/apache/commons/math/random/ValueServer.java @@ -52,7 +52,7 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import java.io.BufferedReader; import java.io.FileReader; import java.io.File; @@ -79,7 +79,7 @@ import java.net.MalformedURLException; *
  • CONSTANT_MODE -- returns mu every time.
  • * * @author Phil Steitz - * @version $Revision: 1.2 $ + * @version $Revision: 1.1 $ * */ public class ValueServer { diff --git a/src/java/org/apache/commons/math/random/package.html b/src/java/org/apache/commons/math/random/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/random/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/special/Beta.java b/src/java/org/apache/commons/math/special/Beta.java index 8ec4ad72d..96953b265 100644 --- a/src/java/org/apache/commons/math/special/Beta.java +++ b/src/java/org/apache/commons/math/special/Beta.java @@ -53,7 +53,7 @@ */ package org.apache.commons.math.special; -import org.apache.commons.math.ContinuedFraction; +import org.apache.commons.math.util.ContinuedFraction; /** * This is a utility class that provides computation methods related to the diff --git a/src/java/org/apache/commons/math/special/Gamma.java b/src/java/org/apache/commons/math/special/Gamma.java index 1a770a5a1..255330e76 100644 --- a/src/java/org/apache/commons/math/special/Gamma.java +++ b/src/java/org/apache/commons/math/special/Gamma.java @@ -53,7 +53,7 @@ */ package org.apache.commons.math.special; -import org.apache.commons.math.ConvergenceException; +import org.apache.commons.math.analysis.ConvergenceException; /** * This is a utility class that provides computation methods related to the diff --git a/src/java/org/apache/commons/math/special/package.html b/src/java/org/apache/commons/math/special/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/special/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java b/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java index 799437daa..78e6081c0 100644 --- a/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java @@ -53,9 +53,7 @@ */ package org.apache.commons.math.stat; -import java.util.Iterator; import java.util.List; - import org.apache.commons.beanutils.PropertyUtils; /** diff --git a/src/java/org/apache/commons/math/Freq.java b/src/java/org/apache/commons/math/stat/Frequency.java similarity index 97% rename from src/java/org/apache/commons/math/Freq.java rename to src/java/org/apache/commons/math/stat/Frequency.java index 4b0d9351d..5a756f8b6 100644 --- a/src/java/org/apache/commons/math/Freq.java +++ b/src/java/org/apache/commons/math/stat/Frequency.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.stat; import java.util.Hashtable; import java.util.Enumeration; @@ -64,7 +64,7 @@ import java.util.Enumeration; * @author Phil Steitz */ -public class Freq { +public class Frequency { private String name; @@ -75,10 +75,10 @@ public class Freq { freqTable = new Hashtable(); } - public Freq() { + public Frequency() { } - public Freq(String name) { + public Frequency(String name) { this.name = name; } diff --git a/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java b/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java index ac23f80fb..ef9a074f1 100644 --- a/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java @@ -53,7 +53,6 @@ */ package org.apache.commons.math.stat; -import java.util.Iterator; import java.util.List; /** diff --git a/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java b/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java index d7766a326..5813b26e4 100644 --- a/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java @@ -53,8 +53,8 @@ */ package org.apache.commons.math.stat; -import org.apache.commons.math.DoubleArray; -import org.apache.commons.math.ContractableDoubleArray; +import org.apache.commons.math.util.ContractableDoubleArray; +import org.apache.commons.math.util.DoubleArray; /** * @author Tim O'Brien diff --git a/src/java/org/apache/commons/math/stat/UnivariateImpl.java b/src/java/org/apache/commons/math/stat/UnivariateImpl.java index 2534c6e5f..4121ccfd2 100644 --- a/src/java/org/apache/commons/math/stat/UnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/UnivariateImpl.java @@ -55,8 +55,8 @@ package org.apache.commons.math.stat; import java.io.Serializable; -import org.apache.commons.math.DoubleArray; -import org.apache.commons.math.FixedDoubleArray; +import org.apache.commons.math.util.DoubleArray; +import org.apache.commons.math.util.FixedDoubleArray; /** * @@ -71,7 +71,7 @@ import org.apache.commons.math.FixedDoubleArray; * @author Mark Diggory * @author Brent Worden * @author Albert Davidson Chou - * @version $Revision: 1.14 $ $Date: 2003/06/21 23:38:27 $ + * @version $Revision: 1.15 $ $Date: 2003/06/22 03:57:55 $ * */ public class UnivariateImpl implements Univariate, Serializable { diff --git a/src/java/org/apache/commons/math/stat/package.html b/src/java/org/apache/commons/math/stat/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/stat/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/java/org/apache/commons/math/ContinuedFraction.java b/src/java/org/apache/commons/math/util/ContinuedFraction.java similarity index 98% rename from src/java/org/apache/commons/math/ContinuedFraction.java rename to src/java/org/apache/commons/math/util/ContinuedFraction.java index 93c076775..783350c09 100644 --- a/src/java/org/apache/commons/math/ContinuedFraction.java +++ b/src/java/org/apache/commons/math/util/ContinuedFraction.java @@ -51,7 +51,9 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; + +import org.apache.commons.math.analysis.ConvergenceException; /** * Provides a generic means to evaluate continued fractions. Subclasses simply diff --git a/src/java/org/apache/commons/math/ContractableDoubleArray.java b/src/java/org/apache/commons/math/util/ContractableDoubleArray.java similarity index 99% rename from src/java/org/apache/commons/math/ContractableDoubleArray.java rename to src/java/org/apache/commons/math/util/ContractableDoubleArray.java index 190c6c5a4..3b6b5bb71 100644 --- a/src/java/org/apache/commons/math/ContractableDoubleArray.java +++ b/src/java/org/apache/commons/math/util/ContractableDoubleArray.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; import java.io.Serializable; diff --git a/src/java/org/apache/commons/math/DoubleArray.java b/src/java/org/apache/commons/math/util/DoubleArray.java similarity index 98% rename from src/java/org/apache/commons/math/DoubleArray.java rename to src/java/org/apache/commons/math/util/DoubleArray.java index 5d129238b..5243f8047 100644 --- a/src/java/org/apache/commons/math/DoubleArray.java +++ b/src/java/org/apache/commons/math/util/DoubleArray.java @@ -51,9 +51,8 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; -import java.util.NoSuchElementException; /** * Provides a single interface for dealing with various flavors diff --git a/src/java/org/apache/commons/math/ExpandableDoubleArray.java b/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java similarity index 99% rename from src/java/org/apache/commons/math/ExpandableDoubleArray.java rename to src/java/org/apache/commons/math/util/ExpandableDoubleArray.java index 55058f25b..19ec0cd14 100644 --- a/src/java/org/apache/commons/math/ExpandableDoubleArray.java +++ b/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; import java.io.Serializable; diff --git a/src/java/org/apache/commons/math/FixedDoubleArray.java b/src/java/org/apache/commons/math/util/FixedDoubleArray.java similarity index 99% rename from src/java/org/apache/commons/math/FixedDoubleArray.java rename to src/java/org/apache/commons/math/util/FixedDoubleArray.java index 4973803be..24136eb4b 100644 --- a/src/java/org/apache/commons/math/FixedDoubleArray.java +++ b/src/java/org/apache/commons/math/util/FixedDoubleArray.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; /** diff --git a/src/java/org/apache/commons/math/MathUtils.java b/src/java/org/apache/commons/math/util/MathUtils.java similarity index 99% rename from src/java/org/apache/commons/math/MathUtils.java rename to src/java/org/apache/commons/math/util/MathUtils.java index d6aa18420..45502d188 100644 --- a/src/java/org/apache/commons/math/MathUtils.java +++ b/src/java/org/apache/commons/math/util/MathUtils.java @@ -52,13 +52,13 @@ * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; /** * Some useful additions to the built-in functions in lang.Math

    * * @author Phil Steitz - * @version $Revision: 1.2 $ $Date: 2003/06/06 03:07:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:56 $ */ public class MathUtils { diff --git a/src/java/org/apache/commons/math/util/package.html b/src/java/org/apache/commons/math/util/package.html new file mode 100644 index 000000000..33fa1819e --- /dev/null +++ b/src/java/org/apache/commons/math/util/package.html @@ -0,0 +1,5 @@ + + + Provides common math utilities such as statistics and a matrix class. + + \ No newline at end of file diff --git a/src/test/org/apache/commons/math/RealMatrixImplTest.java b/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java similarity index 99% rename from src/test/org/apache/commons/math/RealMatrixImplTest.java rename to src/test/org/apache/commons/math/linear/RealMatrixImplTest.java index 8659feec7..f08b69ad1 100644 --- a/src/test/org/apache/commons/math/RealMatrixImplTest.java +++ b/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.linear; import junit.framework.Test; import junit.framework.TestCase; @@ -61,7 +61,7 @@ import junit.framework.TestSuite; * Test cases for the {@link RealMatrixImpl} class. * * @author Phil Steitz - * @version $Revision: 1.2 $ $Date: 2003/06/15 17:01:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:57 $ */ public final class RealMatrixImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/EmpiricalDistributionTest.java b/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java similarity index 97% rename from src/test/org/apache/commons/math/EmpiricalDistributionTest.java rename to src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java index a0d0beaf0..efce67cf6 100644 --- a/src/test/org/apache/commons/math/EmpiricalDistributionTest.java +++ b/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java @@ -51,12 +51,11 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import junit.framework.AssertionFailedError; import java.io.File; import java.net.URL; @@ -67,7 +66,7 @@ import org.apache.commons.math.stat.UnivariateImpl; * Test cases for the EmpiricalDistribution class * * @author Phil Steitz - * @version $Revision: 1.2 $ $Date: 2003/05/29 20:35:45 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:56 $ */ public final class EmpiricalDistributionTest extends TestCase { diff --git a/src/test/org/apache/commons/math/RandomDataTest.java b/src/test/org/apache/commons/math/random/RandomDataTest.java similarity index 98% rename from src/test/org/apache/commons/math/RandomDataTest.java rename to src/test/org/apache/commons/math/random/RandomDataTest.java index 7ddb074b7..86863cca8 100644 --- a/src/test/org/apache/commons/math/RandomDataTest.java +++ b/src/test/org/apache/commons/math/random/RandomDataTest.java @@ -51,17 +51,16 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.random; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import junit.framework.AssertionFailedError; import java.security.NoSuchProviderException; import java.security.NoSuchAlgorithmException; -import java.util.Collection; import java.util.HashSet; +import org.apache.commons.math.stat.Frequency; import org.apache.commons.math.stat.TestStatisticImpl; import org.apache.commons.math.stat.Univariate; import org.apache.commons.math.stat.UnivariateImpl; @@ -70,7 +69,7 @@ import org.apache.commons.math.stat.UnivariateImpl; * Test cases for the RandomData class. * * @author Phil Steitz - * @version $Revision: 1.6 $ $Date: 2003/06/21 23:00:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:56 $ */ public final class RandomDataTest extends TestCase { @@ -106,7 +105,7 @@ public final class RandomDataTest extends TestCase { } catch (IllegalArgumentException ex) { ; } - Freq freq = new Freq(); + Frequency freq = new Frequency(); int value = 0; for (int i=0;i. */ -package org.apache.commons.math; +package org.apache.commons.math.random; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import junit.framework.AssertionFailedError; import java.net.URL; import org.apache.commons.math.stat.Univariate; @@ -66,7 +65,7 @@ import org.apache.commons.math.stat.UnivariateImpl; * Test cases for the ValueServer class. * * @author Phil Steitz - * @version $Revision: 1.4 $ + * @version $Revision: 1.1 $ */ public final class ValueServerTest extends TestCase { diff --git a/src/test/org/apache/commons/math/testData.txt b/src/test/org/apache/commons/math/random/testData.txt similarity index 100% rename from src/test/org/apache/commons/math/testData.txt rename to src/test/org/apache/commons/math/random/testData.txt diff --git a/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java index 6a109f810..fac68d54e 100644 --- a/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java @@ -66,7 +66,7 @@ import org.apache.commons.math.beans.*; * Test cases for the {@link BeanListUnivariateImpl} class. * * @author Tim O'Brien - * @version $Revision: 1.1 $ $Date: 2003/05/29 20:35:46 $ + * @version $Revision: 1.2 $ $Date: 2003/06/22 03:57:53 $ */ public final class BeanListUnivariateImplTest extends TestCase { @@ -102,7 +102,7 @@ public final class BeanListUnivariateImplTest extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(BeanListUnivariateImplTest.class); - suite.setName("Freq Tests"); + suite.setName("Frequency Tests"); return suite; } diff --git a/src/test/org/apache/commons/math/FreqTest.java b/src/test/org/apache/commons/math/stat/FrequencyTest.java similarity index 90% rename from src/test/org/apache/commons/math/FreqTest.java rename to src/test/org/apache/commons/math/stat/FrequencyTest.java index 7453a563a..ed221529f 100644 --- a/src/test/org/apache/commons/math/FreqTest.java +++ b/src/test/org/apache/commons/math/stat/FrequencyTest.java @@ -51,20 +51,20 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.stat; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** - * Test cases for the {@link Freq} class. + * Test cases for the {@link Frequency} class. * * @author Phil Steitz - * @version $Revision: 1.1 $ $Date: 2003/05/12 19:04:38 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:53 $ */ -public final class FreqTest extends TestCase { +public final class FrequencyTest extends TestCase { private long oneL = 1; private long twoL = 2; private int oneI = 1; @@ -73,7 +73,7 @@ public final class FreqTest extends TestCase { private String twoS = "2"; private double tolerance = 10E-15; - public FreqTest(String name) { + public FrequencyTest(String name) { super(name); } @@ -81,14 +81,14 @@ public final class FreqTest extends TestCase { } public static Test suite() { - TestSuite suite = new TestSuite(FreqTest.class); - suite.setName("Freq Tests"); + TestSuite suite = new TestSuite(FrequencyTest.class); + suite.setName("Frequency Tests"); return suite; } /** test freq counts */ public void testCounts() { - Freq f = new Freq("test counts"); + Frequency f = new Frequency("test counts"); assertEquals("total count",0,f.getSumFreq()); f.addValue(oneL); f.addValue(twoL); @@ -104,7 +104,7 @@ public final class FreqTest extends TestCase { /** test pcts */ public void testPcts() { - Freq f = new Freq("test counts"); + Frequency f = new Frequency("test counts"); f.addValue(oneL); f.addValue(twoL); f.addValue(oneI); diff --git a/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java index 9a036dcf6..3f04e86f9 100644 --- a/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java @@ -64,7 +64,7 @@ import junit.framework.TestSuite; * Test cases for the {@link Univariate} class. * * @author Phil Steitz - * @version $Revision: 1.3 $ $Date: 2003/06/21 23:38:27 $ + * @version $Revision: 1.4 $ $Date: 2003/06/22 03:57:53 $ */ public final class ListUnivariateImplTest extends TestCase { @@ -94,7 +94,7 @@ public final class ListUnivariateImplTest extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(ListUnivariateImplTest.class); - suite.setName("Freq Tests"); + suite.setName("Frequency Tests"); return suite; } diff --git a/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java index 376dfd078..f29b8bd69 100644 --- a/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java @@ -56,14 +56,15 @@ package org.apache.commons.math.stat; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.commons.math.RandomDataImpl; -import org.apache.commons.math.RandomData; + +import org.apache.commons.math.random.RandomData; +import org.apache.commons.math.random.RandomDataImpl; /** * Test cases for the {@link Univariate} class. * * @author Phil Steitz - * @version $Revision: 1.3 $ $Date: 2003/06/21 23:02:51 $ + * @version $Revision: 1.4 $ $Date: 2003/06/22 03:57:53 $ */ public final class StoreUnivariateImplTest extends TestCase { @@ -92,7 +93,7 @@ public final class StoreUnivariateImplTest extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(StoreUnivariateImplTest.class); - suite.setName("Freq Tests"); + suite.setName("Frequency Tests"); return suite; } diff --git a/src/test/org/apache/commons/math/stat/UnivariateImplTest.java b/src/test/org/apache/commons/math/stat/UnivariateImplTest.java index d3b1ed903..573872364 100644 --- a/src/test/org/apache/commons/math/stat/UnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/UnivariateImplTest.java @@ -62,7 +62,7 @@ import junit.framework.TestSuite; * * @author Phil Steitz * @author Tim Obrien - * @version $Revision: 1.3 $ $Date: 2003/06/21 23:38:27 $ + * @version $Revision: 1.4 $ $Date: 2003/06/22 03:57:53 $ */ public final class UnivariateImplTest extends TestCase { @@ -89,7 +89,7 @@ public final class UnivariateImplTest extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(UnivariateImplTest.class); - suite.setName("Freq Tests"); + suite.setName("Frequency Tests"); return suite; } diff --git a/src/test/org/apache/commons/math/ContinuedFractionTest.java b/src/test/org/apache/commons/math/util/ContinuedFractionTest.java similarity index 98% rename from src/test/org/apache/commons/math/ContinuedFractionTest.java rename to src/test/org/apache/commons/math/util/ContinuedFractionTest.java index fa55e26f1..235b67c99 100644 --- a/src/test/org/apache/commons/math/ContinuedFractionTest.java +++ b/src/test/org/apache/commons/math/util/ContinuedFractionTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; import junit.framework.TestCase; diff --git a/src/test/org/apache/commons/math/ContractableDoubleArrayTest.java b/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java similarity index 98% rename from src/test/org/apache/commons/math/ContractableDoubleArrayTest.java rename to src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java index 4db456890..bfc1eda57 100644 --- a/src/test/org/apache/commons/math/ContractableDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; /** diff --git a/src/test/org/apache/commons/math/DoubleArrayAbstractTest.java b/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java similarity index 99% rename from src/test/org/apache/commons/math/DoubleArrayAbstractTest.java rename to src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java index 206d4b59c..9e45576bc 100644 --- a/src/test/org/apache/commons/math/DoubleArrayAbstractTest.java +++ b/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; import junit.framework.TestCase; diff --git a/src/test/org/apache/commons/math/ExpandableDoubleArrayTest.java b/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java similarity index 99% rename from src/test/org/apache/commons/math/ExpandableDoubleArrayTest.java rename to src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java index 680933c36..7efce10e4 100644 --- a/src/test/org/apache/commons/math/ExpandableDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; /** diff --git a/src/test/org/apache/commons/math/FixedDoubleArrayTest.java b/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java similarity index 99% rename from src/test/org/apache/commons/math/FixedDoubleArrayTest.java rename to src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java index 6fa21fe9f..4ae158724 100644 --- a/src/test/org/apache/commons/math/FixedDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; /** diff --git a/src/test/org/apache/commons/math/MathUtilsTest.java b/src/test/org/apache/commons/math/util/MathUtilsTest.java similarity index 98% rename from src/test/org/apache/commons/math/MathUtilsTest.java rename to src/test/org/apache/commons/math/util/MathUtilsTest.java index 34922250c..a4b750e1b 100644 --- a/src/test/org/apache/commons/math/MathUtilsTest.java +++ b/src/test/org/apache/commons/math/util/MathUtilsTest.java @@ -51,18 +51,17 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math; +package org.apache.commons.math.util; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import junit.framework.AssertionFailedError; /** * Test cases for the MathUtils class. * * @author Phil Steitz - * @version $Revision: 1.2 $ $Date: 2003/06/06 03:07:39 $ + * @version $Revision: 1.1 $ $Date: 2003/06/22 03:57:55 $ */ public final class MathUtilsTest extends TestCase {