public class Ranlux extends RandomSeedable implements Serializable
| LUXURY LEVELS | ||
| level | p | |
| 0 | 24 | equivalent to the original RCARRY of Marsaglia and Zaman, very long period, but fails many tests. |
| 1 | 48 | considerable improvement in quality over level 0, now passes the gap test, but still fails spectral test. |
| 2 | 97 | passes all known tests, but theoretically still defective. |
| 3 | 223 | DEFAULT VALUE. Any theoretically possible correlations have very small chance of being observed. |
| 4 | 389 | highest possible luxury, all 24 bits chaotic. |
Ranlux()
Ranlux(0,0)
Ranlux(389,1)
Ranlux(75,0)
Source code is available.
| Modifier and Type | Field and Description |
|---|---|
static int |
lxdflt
Default luxury level:
lxdflt=3 |
static int |
maxlev
Maximum luxury level:
maxlev=4 |
| Constructor and Description |
|---|
Ranlux()
Default initialization of RANLUX.
|
Ranlux(Date d)
Initialize RANLUX with default luxury level
and a Date object.
|
Ranlux(int ins)
Initialize RANLUX with default luxury level
and a specified seed.
|
Ranlux(int lux,
Date d)
Initialize RANLUX with specified luxury level
and a Date object.
|
Ranlux(int lux,
int ins)
Initialize RANLUX with specified luxury level
and seed.
|
Ranlux(int lux,
long ins)
Initialize RANLUX with specified luxury level
and seed.
|
Ranlux(long ins)
Initialize RANLUX with default luxury level
and a specified seed.
|
| Modifier and Type | Method and Description |
|---|---|
double |
raw()
The random number generator.
|
void |
setDiag(boolean b)
Turns diagnostic messages on and off.
|
ClockSeed, ClockSeedpublic static final int maxlev
maxlev=4public static final int lxdflt
lxdflt=3public Ranlux()
jsdflt=314159265 and luxury level 3.public Ranlux(int lux,
int ins)
lux - luxury level from 0-4.ins - seed, a positive integer.public Ranlux(int lux,
long ins)
lux - luxury level from 0-4.ins - seed, a positive long.public Ranlux(int ins)
ins - seed, a positive integerpublic Ranlux(long ins)
ins - seed, a positive integerpublic Ranlux(int lux,
Date d)
RandomElement e = Ranlux(4,new Date());
lux - luxury level from 0-4.d - date used to generate seedpublic Ranlux(Date d)
RandomElement e = Ranlux(new Date());
d - date used to generate seedpublic void setDiag(boolean b)
b - diagnostic message statuspublic final double raw()
raw in class RandomElementRandomJavaCopyright © 2015. All rights reserved.