org.apache.commons.math3.distribution
Class UniformRealDistributionTest

java.lang.Object
  extended by org.apache.commons.math3.distribution.RealDistributionAbstractTest
      extended by org.apache.commons.math3.distribution.UniformRealDistributionTest

public class UniformRealDistributionTest
extends RealDistributionAbstractTest

Test cases for UniformRealDistribution. See class javadoc for RealDistributionAbstractTest for further details.


Constructor Summary
UniformRealDistributionTest()
           
 
Method Summary
 double[] makeCumulativeTestPoints()
          Creates the default cumulative probability distribution test input values
 double[] makeCumulativeTestValues()
          Creates the default cumulative probability density test expected values
 double[] makeDensityTestValues()
          Creates the default probability density test expected values
 UniformRealDistribution makeDistribution()
          Creates the default uniform real distribution instance to use in tests.
 void setUp()
          Setup sets all test instance data to default values
 void testGetLowerBound()
          Test lower bound getter.
 void testGetUpperBound()
          Test upper bound getter.
 void testInverseCumulativeDistribution()
          Check accuracy of analytical inverse CDF.
 void testMeanVariance()
          Test mean/variance.
 void testPreconditions1()
          Test pre-condition for equal lower/upper bound.
 void testPreconditions2()
          Test pre-condition for lower bound larger than upper bound.
 
Methods inherited from class org.apache.commons.math3.distribution.RealDistributionAbstractTest
getCumulativeTestPoints, getCumulativeTestValues, getDensityTestValues, getDistribution, getInverseCumulativeTestPoints, getInverseCumulativeTestValues, getTolerance, makeInverseCumulativeTestPoints, makeInverseCumulativeTestValues, setCumulativeTestPoints, setCumulativeTestValues, setDensityTestValues, setDistribution, setInverseCumulativeTestPoints, setInverseCumulativeTestValues, setTolerance, tearDown, testConsistency, testCumulativeProbabilities, testDensities, testDensityIntegrals, testDistributionClone, testIllegalArguments, testInverseCumulativeProbabilities, testIsSupportLowerBoundInclusive, testIsSupportUpperBoundInclusive, testSampling, verifyCumulativeProbabilities, verifyDensities, verifyInverseCumulativeProbabilities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformRealDistributionTest

public UniformRealDistributionTest()
Method Detail

setUp

public void setUp()
Description copied from class: RealDistributionAbstractTest
Setup sets all test instance data to default values

Overrides:
setUp in class RealDistributionAbstractTest

makeDistribution

public UniformRealDistribution makeDistribution()
Creates the default uniform real distribution instance to use in tests.

Specified by:
makeDistribution in class RealDistributionAbstractTest

makeCumulativeTestPoints

public double[] makeCumulativeTestPoints()
Creates the default cumulative probability distribution test input values

Specified by:
makeCumulativeTestPoints in class RealDistributionAbstractTest

makeCumulativeTestValues

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

Specified by:
makeCumulativeTestValues in class RealDistributionAbstractTest

makeDensityTestValues

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

Specified by:
makeDensityTestValues in class RealDistributionAbstractTest

testGetLowerBound

public void testGetLowerBound()
Test lower bound getter.


testGetUpperBound

public void testGetUpperBound()
Test upper bound getter.


testPreconditions1

public void testPreconditions1()
Test pre-condition for equal lower/upper bound.


testPreconditions2

public void testPreconditions2()
Test pre-condition for lower bound larger than upper bound.


testMeanVariance

public void testMeanVariance()
Test mean/variance.


testInverseCumulativeDistribution

public void testInverseCumulativeDistribution()
Check accuracy of analytical inverse CDF. Fails if a solver is used with the default accuracy.



Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.