You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by md...@apache.org on 2003/11/10 19:00:25 UTC
cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/stat DescriptiveStatisticsTest.java DescriptiveStatisticsFuture.java
mdiggory 2003/11/10 10:00:25
Modified: math/src/test/org/apache/commons/math/stat
DescriptiveStatisticsTest.java
Removed: math/src/test/org/apache/commons/math/stat
DescriptiveStatisticsFuture.java
Log:
Refactoring Error on my part, this class should not have been added and the Test shouldn't have used it.
Revision Changes Path
1.2 +13 -10 jakarta-commons/math/src/test/org/apache/commons/math/stat/DescriptiveStatisticsTest.java
Index: DescriptiveStatisticsTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/DescriptiveStatisticsTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DescriptiveStatisticsTest.java 10 Nov 2003 17:43:31 -0000 1.1
+++ DescriptiveStatisticsTest.java 10 Nov 2003 18:00:25 -0000 1.2
@@ -80,7 +80,7 @@
private double max = 3;
private double skewness = 0;
private double kurtosis = 0.5;
- private int kClass = DescriptiveStatisticsFuture.LEPTOKURTIC;
+ private int kClass = DescriptiveStatistics.LEPTOKURTIC;
private double tolerance = 10E-15;
public DescriptiveStatisticsTest(String name) {
@@ -98,7 +98,7 @@
/** test stats */
public void testStats() {
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture();
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
assertEquals("total count",0,u.getN(),tolerance);
u.addValue(one);
u.addValue(two);
@@ -117,7 +117,7 @@
}
public void testN0andN1Conditions() throws Exception {
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture();
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
assertTrue("Mean of n = 0 set should be NaN",
Double.isNaN( u.getMean() ) );
@@ -137,7 +137,7 @@
}
public void testSkewAndKurtosis() {
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture();
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
double[] testArray =
{ 12.5, 12, 11.8, 14.2, 14.9, 14.5, 21, 8.2, 10.3, 11.3, 14.1,
@@ -153,8 +153,8 @@
}
public void testProductAndGeometricMean() throws Exception {
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture(10);
- //u.setWindow(10);
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
+ u.setWindowSize(10);
u.addValue( 1.0 );
u.addValue( 2.0 );
@@ -183,7 +183,8 @@
double[] test1 = {5,4,3,2,1,0};
double[] test2 = {5,2,1,0,4,3};
- DescriptiveStatisticsFuture stats = new DescriptiveStatisticsFuture(12);
+ DescriptiveStatistics stats = DescriptiveStatistics.newInstance();
+ stats.setWindowSize(12);
for(int i = 0; i < test1.length; i++){
stats.addValue(test1[i]);
@@ -260,7 +261,8 @@
private void tstGetSortedValues(double[] test) {
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture(test.length);
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
+ u.setWindowSize(test.length);
for (int i = 0; i < test.length; i++) {
u.addValue(test[i]);
}
@@ -277,7 +279,8 @@
public void testPercentiles() {
double[] test = {5,4,3,2,1};
- DescriptiveStatisticsFuture u = new DescriptiveStatisticsFuture(110);
+ DescriptiveStatistics u = DescriptiveStatistics.newInstance();
+ u.setWindowSize(110);
for (int i = 0; i < test.length; i++) {
u.addValue(test[i]);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org