The Random class provides methods to generate pseudo-random numbers via a plug-in PRNG, which is simply any function that generates a Long primitive.
Create a random InputStream of bytes from a PRNG.
Create a random InputStream of bytes from a PRNG. Useful for testing, e.g., for feeding into dieharder battery of tests via stdin.
Provides a way to append two arrays of possibly different types together by intelligently promoting primitive types where possible.
Provides a way to append two arrays of possibly different types together by intelligently promoting primitive types where possible.
Key method is Concat.append(array1, array2)
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.03 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.03 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Test p-value ---------------------------------------------- 10 RandomWalk1 J 0.9997 ---------------------------------------------- All other tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 01:00:08.48
All tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:38:24.56
All tests were passed
Marsaglia Lagged Fibonacci PRNG
Marsaglia Lagged Fibonacci PRNG
See https://groups.google.com/forum/?fromgroups=#!msg/sci.crypt/yoaCpGWKEk0/UXCxgufdTesJ
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.71 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.71 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Test p-value ---------------------------------------------- 8 MatrixRank eps ---------------------------------------------- All other tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 00:57:39.11 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Test p-value ---------------------------------------------- 3 CollisionOver, t = 2 1.4e-10 6 CollisionOver, t = 4 eps 10 CollisionOver, t = 20 1.3e-62 11 BirthdaySpacings, t = 2 5.2e-5 16 BirthdaySpacings, t = 8 1.7e-12 17 BirthdaySpacings, t = 8 3.3e-73 34 Gap, r = 22 eps 56 MatrixRank, 60 x 60 eps 57 MatrixRank, 60 x 60 eps 58 MatrixRank, 300 x 300 eps 59 MatrixRank, 300 x 300 eps 60 MatrixRank, 1200 x 1200 eps 61 MatrixRank, 1200 x 1200 eps 65 RandomWalk1 H (L = 90) eps 65 RandomWalk1 M (L = 90) eps 66 RandomWalk1 H (L = 90) eps 66 RandomWalk1 M (L = 90) eps 66 RandomWalk1 J (L = 90) eps 67 RandomWalk1 H (L = 1000) eps 67 RandomWalk1 M (L = 1000) 2.0e-9 67 RandomWalk1 C (L = 1000) 1.0e-4 68 RandomWalk1 H (L = 1000) 2.0e-12 68 RandomWalk1 M (L = 1000) eps 68 RandomWalk1 J (L = 1000) eps 69 RandomWalk1 C (L = 10000) 9.7e-4 71 LinearComp, r = 0 1 - eps1 72 LinearComp, r = 29 1 - eps1 85 HammingIndep, L = 30 eps 86 HammingIndep, L = 30 eps 87 HammingIndep, L = 300 eps 88 HammingIndep, L = 300 eps ---------------------------------------------- All other tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:31:19.41 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Test p-value ---------------------------------------------- 2 SerialOver, r = 22 eps 3 CollisionOver, t = 2 6.8e-22 6 CollisionOver, t = 3 eps 12 CollisionOver, t = 21 eps 13 BirthdaySpacings, t = 2 1.7e-18 15 BirthdaySpacings, t = 4 eps 18 BirthdaySpacings, t = 8 7.2e-289 19 BirthdaySpacings, t = 8 eps 21 BirthdaySpacings, t = 16 3.8e-66 37 Gap, r = 20 eps 68 MatrixRank, L=1000, r=0 eps 69 MatrixRank, L=1000, r=26 eps 70 MatrixRank, L=5000 eps 71 MatrixRank, L=5000 eps 77 RandomWalk1 H (L=1000, r=20) eps 77 RandomWalk1 M (L=1000, r=20) eps 77 RandomWalk1 J (L=1000, r=20) eps 80 LinearComp, r = 0 1 - eps1 81 LinearComp, r = 29 1 - eps1 ---------------------------------------------- All other tests were passed
Marsaglia XorShift PRNG
Marsaglia XorShift PRNG
See Marsaglia
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:18.85
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:18.85
All tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 01:00:08.48
All tests were passed
Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:57:21.49 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):
Test p-value ---------------------------------------------- 80 LinearComp, r = 0 1 - eps1 81 LinearComp, r = 29 1 - eps1 ---------------------------------------------- All other tests were passed
Ziff 4-tap shift-register-sequence
Ziff 4-tap shift-register-sequence
http://arxiv.org/pdf/cond-mat/9710104v1.pdf http://www.aip.org/cip/pdf/vol_12/iss_4/385_1.pdf
Creates a string out of count number of elements extracted from total elements between offsets [0 ...
Creates a string out of count number of elements extracted from total elements between offsets [0 ... count / 2) and (total - count / 2 ... total), using a callback that generates a string at each offset, and inserting a break string if count > total.
Number of elements to print
Total number of elements in sequence
Generates a string at each offset
Produces a string to insert as a break
Takes n elements from the front and from the back of array
Takes n elements from the front and from the back of array
Array
Number of elements to take
Additional utilities that need a home