Package org.uncommons.maths.random
Class DiehardInputGenerator
java.lang.Object
org.uncommons.maths.random.DiehardInputGenerator
Utility to generate an input file for the
DIEHARD suite of statistical
tests for random number generators.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
generateOutputFile
(Random rng, File outputFile) Generates a file of random data in a format suitable for the DIEHARD test.static void
-
Field Details
-
INT_COUNT
private static final int INT_COUNT- See Also:
-
-
Constructor Details
-
DiehardInputGenerator
private DiehardInputGenerator()
-
-
Method Details
-
main
- Parameters:
args
- The first argument is the class name of the RNG, the second is the file to use for output.- Throws:
Exception
- If there are problems setting up the RNG or writing to the output file.
-
generateOutputFile
Generates a file of random data in a format suitable for the DIEHARD test. DIEHARD requires 3 million 32-bit integers.- Parameters:
rng
- The random number generator to use to generate the data.outputFile
- The file that the random data is written to.- Throws:
IOException
- If there is a problem writing to the file.
-