Class: MersenneTwister

MersenneTwister()

new MersenneTwister()

Source:

Methods

genrand_int31() → {number}

generates a random number on [0,0x7fffffff]-interval
Source:
Returns:
Type
number

genrand_int32() → {number}

generates a random number on [0,0xffffffff]-interval
Source:
Returns:
Type
number

genrand_real1() → {number}

generates a random number on [0,1]-real-interval
Source:
Returns:
Type
number

genrand_real2() → {number}

generates a random number on [0,1)-real-interval
Source:
Returns:
Type
number

genrand_real3() → {number}

generates a random number on (0,1)-real-interval
Source:
Returns:
Type
number

genrand_res53() → {number}

generates a random number on [0,1) with 53-bit resolution
Source:
Returns:
Type
number

init_by_array(init_key, key_length)

initialize by an array with array-length init_key is the array for initializing keys key_length is its length slight change for C++, 2004/2/26
Parameters:
Name Type Description
init_key Array.<number>
key_length number
Source:

init_genrand(seed)

initializes state[N] with a seed
Parameters:
Name Type Description
seed number
Source: