org.apache.commons.math.stat.descriptive
Class StorelessUnivariateStatisticAbstractTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.stat.descriptive.UnivariateStatisticAbstractTest
              extended by org.apache.commons.math.stat.descriptive.StorelessUnivariateStatisticAbstractTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
FirstMomentTest, FourthMomentTest, GeometricMeanTest, KurtosisTest, MaxTest, MeanTest, MinTest, ProductTest, SecondMomentTest, SkewnessTest, StandardDeviationTest, SumLogTest, SumSqTest, SumTest, ThirdMomentTest, VarianceTest

public abstract class StorelessUnivariateStatisticAbstractTest
extends UnivariateStatisticAbstractTest

Test cases for StorelessUnivariateStatistic classes.

Version:
$Revision: 780541 $ $Date: 2009-05-31 20:47:02 -0400 (Sun, 31 May 2009) $

Field Summary
protected  double[][] smallSamples
          Small sample arrays
 
Fields inherited from class org.apache.commons.math.stat.descriptive.UnivariateStatisticAbstractTest
fourthMoment, geoMean, kurt, max, mean, median, min, percentile5, percentile95, product, secondMoment, skew, std, sum, sumLog, sumSq, testArray, thirdMoment, tolerance, var
 
Constructor Summary
StorelessUnivariateStatisticAbstractTest(String name)
           
 
Method Summary
abstract  double expectedValue()
          Expected value for the testArray defined in UnivariateStatisticAbstractTest
abstract  org.apache.commons.math.stat.descriptive.UnivariateStatistic getUnivariateStatistic()
          Return a new instance of the statistic
 void testConsistency()
          Make sure that evaluate(double[]) and inrementAll(double[]), getResult() give same results.
 void testCopyConsistency()
          Verifies that copied statistics remain equal to originals when incremented the same way.
 void testEqualsAndHashCode()
           
 void testIncrementation()
          Verifies that increment() and incrementAll work properly.
 void testMomentSmallSamples()
           
 void testSerial()
           
 void testSerialization()
           
 
Methods inherited from class org.apache.commons.math.stat.descriptive.UnivariateStatisticAbstractTest
getTolerance, testCopy, testEvaluation
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

smallSamples

protected double[][] smallSamples
Small sample arrays

Constructor Detail

StorelessUnivariateStatisticAbstractTest

public StorelessUnivariateStatisticAbstractTest(String name)
Method Detail

getUnivariateStatistic

public abstract org.apache.commons.math.stat.descriptive.UnivariateStatistic getUnivariateStatistic()
Return a new instance of the statistic

Specified by:
getUnivariateStatistic in class UnivariateStatisticAbstractTest

expectedValue

public abstract double expectedValue()
Expected value for the testArray defined in UnivariateStatisticAbstractTest

Specified by:
expectedValue in class UnivariateStatisticAbstractTest

testIncrementation

public void testIncrementation()
                        throws Exception
Verifies that increment() and incrementAll work properly.

Throws:
Exception

testSerialization

public void testSerialization()
                       throws Exception
Throws:
Exception

testEqualsAndHashCode

public void testEqualsAndHashCode()

testMomentSmallSamples

public void testMomentSmallSamples()

testConsistency

public void testConsistency()
Make sure that evaluate(double[]) and inrementAll(double[]), getResult() give same results.


testCopyConsistency

public void testCopyConsistency()
Verifies that copied statistics remain equal to originals when incremented the same way.


testSerial

public void testSerial()


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.