Method | Description | |
---|---|---|
Bool ( ) : bool |
Draw a random boolean with equal probability of drawing true or false.
|
|
Byte ( ) : byte |
Draw a random and uniform byte.
|
|
Bytes ( int length ) : byte[] |
Draw an array of random and uniform bytes.
|
|
Index ( int n ) : int |
Draw a random index from the range {0, .., n-1}
|
|
RanSystem ( ) |
Constructs the PRNG-object and seeds the PRNG with the current time of day. This is what you will mostly want to use.
|
|
RanSystem ( int seed ) |
Constructs the PRNG-object using the designated seed. This is useful if you want to repeat experiments with the same sequence of pseudo-random numbers.
|
|
Uniform ( ) : double |
Draw a uniform random number in the exclusive range (0,1)
|
public final Bytes ( int length ) : byte[] | ||
length | int | The array length requested. |
return | byte[] |
public final Index ( int n ) : int | ||
n | int | The exclusive upper bound. |
return | int |