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
This commit is contained in:
Mark R. Diggory 2003-06-22 03:57:57 +00:00
parent 9b2b61b777
commit 4f17b718b3
47 changed files with 117 additions and 87 deletions

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.analysis;
/**
* Error thrown when a numerical computation can not be performed because the

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.analysis;
/**
* Utility class comprised of root finding techniques.

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.analysis;
/**
* @author Brent Worden

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -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

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -52,12 +52,12 @@
* <http://www.apache.org/>.
*/
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 {

View File

@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
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 {

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
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 {

View File

@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
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;
* </ol></p>
*
* @author Phil Steitz
* @version $Revision: 1.4 $
* @version $Revision: 1.1 $
*/
public class EmpiricalDistributionImpl implements Serializable,EmpiricalDistribution {

View File

@ -52,13 +52,13 @@
* <http://www.apache.org/>.
*/
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 {
/**

View File

@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
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).</li></ul>
*
* @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 {

View File

@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
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;
* <li> CONSTANT_MODE -- returns <code>mu</code> every time.</li></ul>
*
* @author Phil Steitz
* @version $Revision: 1.2 $
* @version $Revision: 1.1 $
*
*/
public class ValueServer {

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -53,9 +53,7 @@
*/
package org.apache.commons.math.stat;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.beanutils.PropertyUtils;
/**

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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;
}

View File

@ -53,7 +53,6 @@
*/
package org.apache.commons.math.stat;
import java.util.Iterator;
import java.util.List;
/**

View File

@ -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 <a href="mailto:tobrien@apache.org">Tim O'Brien</a>

View File

@ -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 <a href="mailto:mdiggory@apache.org">Mark Diggory</a>
* @author Brent Worden
* @author <a href="mailto:HotFusionMan@Yahoo.com">Albert Davidson Chou</a>
* @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 {

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -51,7 +51,9 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
import java.io.Serializable;

View File

@ -51,9 +51,8 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
import java.util.NoSuchElementException;
/**
* Provides a single interface for dealing with various flavors

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
import java.io.Serializable;

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
/**

View File

@ -52,13 +52,13 @@
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
/**
* Some useful additions to the built-in functions in lang.Math<p>
*
* @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 {

View File

@ -0,0 +1,5 @@
<html>
<body>
Provides common math utilities such as statistics and a matrix class.
</body>
</html>

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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 {

View File

@ -51,12 +51,11 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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 {

View File

@ -51,17 +51,16 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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<smallSampleSize;i++) {
value = randomData.nextInt(0,3);
@ -134,7 +133,7 @@ public final class RandomDataTest extends TestCase {
} catch (IllegalArgumentException ex) {
;
}
Freq freq = new Freq();
Frequency freq = new Frequency();
long value = 0;
for (int i=0;i<smallSampleSize;i++) {
value = randomData.nextLong(0,3);
@ -162,7 +161,7 @@ public final class RandomDataTest extends TestCase {
} catch (IllegalArgumentException ex) {
;
}
Freq freq = new Freq();
Frequency freq = new Frequency();
long value = 0;
for (int i=0;i<smallSampleSize;i++) {
value = randomData.nextSecureLong(0,3);
@ -190,7 +189,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<smallSampleSize;i++) {
value = randomData.nextSecureInt(0,3);
@ -223,7 +222,7 @@ public final class RandomDataTest extends TestCase {
} catch (IllegalArgumentException ex) {
;
}
Freq f = new Freq();
Frequency f = new Frequency();
long v = 0;
for (int i = 0; i<largeSampleSize; i++) {
try {
@ -284,7 +283,7 @@ public final class RandomDataTest extends TestCase {
if (hexString.length() != 1) {
fail("incorrect length for generated string");
}
Freq f = new Freq();
Frequency f = new Frequency();
for (int i = 0; i < smallSampleSize; i++) {
hexString = randomData.nextHexString(100);
if (hexString.length() != 100) {
@ -338,7 +337,7 @@ public final class RandomDataTest extends TestCase {
if (hexString.length() != 1) {
fail("incorrect length for generated string");
}
Freq f = new Freq();
Frequency f = new Frequency();
for (int i = 0; i < smallSampleSize; i++) {
hexString = randomData.nextSecureHexString(100);
if (hexString.length() != 100) {

View File

@ -51,12 +51,11 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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 {

View File

@ -66,7 +66,7 @@ import org.apache.commons.math.beans.*;
* Test cases for the {@link BeanListUnivariateImpl} class.
*
* @author <a href="mailto:tobrien@apache.org">Tim O'Brien</a>
* @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;
}

View File

@ -51,20 +51,20 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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);

View File

@ -64,7 +64,7 @@ import junit.framework.TestSuite;
* Test cases for the {@link Univariate} class.
*
* @author <a href="mailto:phil@steitz.com">Phil Steitz</a>
* @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;
}

View File

@ -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 <a href="mailto:phil@steitz.com">Phil Steitz</a>
* @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;
}

View File

@ -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;
}

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
import junit.framework.TestCase;

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
/**

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
import junit.framework.TestCase;

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
/**

View File

@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math;
package org.apache.commons.math.util;
/**

View File

@ -51,18 +51,17 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
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 {