org.apache.commons.math.distribution
Class HypergeometricDistributionTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.distribution.IntegerDistributionAbstractTest
              extended by org.apache.commons.math.distribution.HypergeometricDistributionTest
All Implemented Interfaces:
junit.framework.Test

public class HypergeometricDistributionTest
extends IntegerDistributionAbstractTest

Test cases for HyperGeometriclDistribution. Extends IntegerDistributionAbstractTest. See class javadoc for IntegerDistributionAbstractTest for details.

Version:
$Revision: 762087 $ $Date: 2009-04-05 10:20:18 -0400 (Sun, 05 Apr 2009) $

Constructor Summary
HypergeometricDistributionTest(String name)
          Constructor for ChiSquareDistributionTest.
 
Method Summary
 int[] makeCumulativeTestPoints()
          Creates the default cumulative probability density test input values
 double[] makeCumulativeTestValues()
          Creates the default cumulative probability density test expected values
 int[] makeDensityTestPoints()
          Creates the default probability density test input values
 double[] makeDensityTestValues()
          Creates the default probability density test expected values
 org.apache.commons.math.distribution.IntegerDistribution makeDistribution()
          Creates the default discrete distribution instance to use in tests.
 double[] makeInverseCumulativeTestPoints()
          Creates the default inverse cumulative probability test input values
 int[] makeInverseCumulativeTestValues()
          Creates the default inverse cumulative probability density test expected values
 void testDegenerateFullSample()
          Verify that if sampleSize = populationSize, mass is concentrated on numberOfSuccesses
 void testDegenerateNoFailures()
          Verify that if there are no failures, mass is concentrated on sampleSize
 void testDegenerateNoSuccesses()
          Verify that if there are no successes, mass is concentrated on 0
 void testLargeValues()
           
 void testMoreLargeValues()
           
 void testPopulationSize()
           
 
Methods inherited from class org.apache.commons.math.distribution.IntegerDistributionAbstractTest
getCumulativeTestPoints, getCumulativeTestValues, getDensityTestPoints, getDensityTestValues, getDistribution, getInverseCumulativeTestPoints, getInverseCumulativeTestValues, getTolerance, setCumulativeTestPoints, setCumulativeTestValues, setDensityTestPoints, setDensityTestValues, setDistribution, setInverseCumulativeTestPoints, setInverseCumulativeTestValues, setTolerance, setUp, tearDown, testCumulativeProbabilities, testDensities, testFloatingPointArguments, testIllegalArguments, testInverseCumulativeProbabilities, verifyCumulativeProbabilities, verifyDensities, verifyInverseCumulativeProbabilities
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

HypergeometricDistributionTest

public HypergeometricDistributionTest(String name)
Constructor for ChiSquareDistributionTest.

Parameters:
name -
Method Detail

makeDistribution

public org.apache.commons.math.distribution.IntegerDistribution makeDistribution()
Creates the default discrete distribution instance to use in tests.

Specified by:
makeDistribution in class IntegerDistributionAbstractTest

makeDensityTestPoints

public int[] makeDensityTestPoints()
Creates the default probability density test input values

Specified by:
makeDensityTestPoints in class IntegerDistributionAbstractTest

makeDensityTestValues

public double[] makeDensityTestValues()
Creates the default probability density test expected values

Specified by:
makeDensityTestValues in class IntegerDistributionAbstractTest

makeCumulativeTestPoints

public int[] makeCumulativeTestPoints()
Creates the default cumulative probability density test input values

Specified by:
makeCumulativeTestPoints in class IntegerDistributionAbstractTest

makeCumulativeTestValues

public double[] makeCumulativeTestValues()
Creates the default cumulative probability density test expected values

Specified by:
makeCumulativeTestValues in class IntegerDistributionAbstractTest

makeInverseCumulativeTestPoints

public double[] makeInverseCumulativeTestPoints()
Creates the default inverse cumulative probability test input values

Specified by:
makeInverseCumulativeTestPoints in class IntegerDistributionAbstractTest

makeInverseCumulativeTestValues

public int[] makeInverseCumulativeTestValues()
Creates the default inverse cumulative probability density test expected values

Specified by:
makeInverseCumulativeTestValues in class IntegerDistributionAbstractTest

testDegenerateNoFailures

public void testDegenerateNoFailures()
                              throws Exception
Verify that if there are no failures, mass is concentrated on sampleSize

Throws:
Exception

testDegenerateNoSuccesses

public void testDegenerateNoSuccesses()
                               throws Exception
Verify that if there are no successes, mass is concentrated on 0

Throws:
Exception

testDegenerateFullSample

public void testDegenerateFullSample()
                              throws Exception
Verify that if sampleSize = populationSize, mass is concentrated on numberOfSuccesses

Throws:
Exception

testPopulationSize

public void testPopulationSize()

testLargeValues

public void testLargeValues()

testMoreLargeValues

public void testMoreLargeValues()


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