Java Doc for IntegerDistributionAbstractTest.java in  » Science » Apache-commons-math-1.1 » org » apache » commons » math » distribution » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Apache commons math 1.1 » org.apache.commons.math.distribution 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.math.distribution.IntegerDistributionAbstractTest

All known Subclasses:   org.apache.commons.math.distribution.BinomialDistributionTest,  org.apache.commons.math.distribution.PoissonDistributionTest,  org.apache.commons.math.distribution.HypergeometricDistributionTest,
IntegerDistributionAbstractTest
abstract public class IntegerDistributionAbstractTest extends TestCase (Code)
Abstract base class for IntegerDistribution tests.

To create a concrete test class for an integer distribution implementation, implement makeDistribution() to return a distribution instance to use in tests and each of the test data generation methods below. In each case, the test points and test values arrays returned represent parallel arrays of inputs and expected values for the distribution returned by makeDistribution().

makeDensityTestPoints() -- arguments used to test probability density calculation makeDensityTestValues() -- expected probability densities makeCumulativeTestPoints() -- arguments used to test cumulative probabilities makeCumulativeTestValues() -- expected cumulative probabilites makeInverseCumulativeTestPoints() -- arguments used to test inverse cdf evaluation makeInverseCumulativeTestValues() -- expected inverse cdf values

To implement additional test cases with different distribution instances and test data, use the setXxx methods for the instance data in test cases and call the verifyXxx methods to verify results.
version:
   $Revision: 155427 $ $Date: 2005-02-26 06:11:52 -0700 (Sat, 26 Feb 2005) $




Constructor Summary
public  IntegerDistributionAbstractTest(String name)
     Constructor for IntegerDistributionAbstractTest.

Method Summary
protected  int[]getCumulativeTestPoints()
    
protected  double[]getCumulativeTestValues()
    
protected  int[]getDensityTestPoints()
    
protected  double[]getDensityTestValues()
    
protected  IntegerDistributiongetDistribution()
    
protected  double[]getInverseCumulativeTestPoints()
    
protected  int[]getInverseCumulativeTestValues()
    
protected  doublegetTolerance()
    
abstract public  int[]makeCumulativeTestPoints()
    
abstract public  double[]makeCumulativeTestValues()
    
abstract public  int[]makeDensityTestPoints()
    
abstract public  double[]makeDensityTestValues()
    
abstract public  IntegerDistributionmakeDistribution()
     Creates the default discrete distribution instance to use in tests.
abstract public  double[]makeInverseCumulativeTestPoints()
    
abstract public  int[]makeInverseCumulativeTestValues()
    
protected  voidsetCumulativeTestPoints(int[] cumulativeTestPoints)
    
protected  voidsetCumulativeTestValues(double[] cumulativeTestValues)
    
protected  voidsetDensityTestPoints(int[] densityTestPoints)
    
protected  voidsetDensityTestValues(double[] densityTestValues)
    
protected  voidsetDistribution(IntegerDistribution distribution)
    
protected  voidsetInverseCumulativeTestPoints(double[] inverseCumulativeTestPoints)
    
protected  voidsetInverseCumulativeTestValues(int[] inverseCumulativeTestValues)
    
protected  voidsetTolerance(double tolerance)
    
protected  voidsetUp()
    
protected  voidtearDown()
    
public  voidtestCumulativeProbabilities()
    
public  voidtestDensities()
    
public  voidtestIllegalArguments()
    
public  voidtestInverseCumulativeProbabilities()
    
protected  voidverifyCumulativeProbabilities()
    
protected  voidverifyDensities()
    
protected  voidverifyInverseCumulativeProbabilities()
    


Constructor Detail
IntegerDistributionAbstractTest
public IntegerDistributionAbstractTest(String name)(Code)
Constructor for IntegerDistributionAbstractTest.
Parameters:
  name -




Method Detail
getCumulativeTestPoints
protected int[] getCumulativeTestPoints()(Code)
Returns the cumulativeTestPoints.



getCumulativeTestValues
protected double[] getCumulativeTestValues()(Code)
Returns the cumulativeTestValues.



getDensityTestPoints
protected int[] getDensityTestPoints()(Code)
Returns the densityTestPoints.



getDensityTestValues
protected double[] getDensityTestValues()(Code)
Returns the densityTestValues.



getDistribution
protected IntegerDistribution getDistribution()(Code)
Returns the distribution.



getInverseCumulativeTestPoints
protected double[] getInverseCumulativeTestPoints()(Code)
Returns the inverseCumulativeTestPoints.



getInverseCumulativeTestValues
protected int[] getInverseCumulativeTestValues()(Code)
Returns the inverseCumulativeTestValues.



getTolerance
protected double getTolerance()(Code)
Returns the tolerance.



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



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



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



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



makeDistribution
abstract public IntegerDistribution makeDistribution()(Code)
Creates the default discrete distribution instance to use in tests.



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



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



setCumulativeTestPoints
protected void setCumulativeTestPoints(int[] cumulativeTestPoints)(Code)

Parameters:
  cumulativeTestPoints - The cumulativeTestPoints to set.



setCumulativeTestValues
protected void setCumulativeTestValues(double[] cumulativeTestValues)(Code)

Parameters:
  cumulativeTestValues - The cumulativeTestValues to set.



setDensityTestPoints
protected void setDensityTestPoints(int[] densityTestPoints)(Code)

Parameters:
  densityTestPoints - The densityTestPoints to set.



setDensityTestValues
protected void setDensityTestValues(double[] densityTestValues)(Code)

Parameters:
  densityTestValues - The densityTestValues to set.



setDistribution
protected void setDistribution(IntegerDistribution distribution)(Code)

Parameters:
  distribution - The distribution to set.



setInverseCumulativeTestPoints
protected void setInverseCumulativeTestPoints(double[] inverseCumulativeTestPoints)(Code)

Parameters:
  inverseCumulativeTestPoints - The inverseCumulativeTestPoints to set.



setInverseCumulativeTestValues
protected void setInverseCumulativeTestValues(int[] inverseCumulativeTestValues)(Code)

Parameters:
  inverseCumulativeTestValues - The inverseCumulativeTestValues to set.



setTolerance
protected void setTolerance(double tolerance)(Code)

Parameters:
  tolerance - The tolerance to set.



setUp
protected void setUp() throws Exception(Code)
Setup sets all test instance data to default values



tearDown
protected void tearDown() throws Exception(Code)
Cleans up test instance data



testCumulativeProbabilities
public void testCumulativeProbabilities() throws Exception(Code)
Verifies that cumulative probability density calculations match exptected values using default test instance data



testDensities
public void testDensities() throws Exception(Code)
Verifies that probability density calculations match exptected values using default test instance data



testIllegalArguments
public void testIllegalArguments() throws Exception(Code)
Verifies that illegal arguments are correctly handled



testInverseCumulativeProbabilities
public void testInverseCumulativeProbabilities() throws Exception(Code)
Verifies that inverse cumulative probability density calculations match exptected values using default test instance data



verifyCumulativeProbabilities
protected void verifyCumulativeProbabilities() throws Exception(Code)
Verifies that cumulative probability density calculations match exptected values using current test instance data



verifyDensities
protected void verifyDensities() throws Exception(Code)
Verifies that probability density calculations match exptected values using current test instance data



verifyInverseCumulativeProbabilities
protected void verifyInverseCumulativeProbabilities() throws Exception(Code)
Verifies that inverse cumulative probability density calculations match exptected values using current test instance data



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.