XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ InitByArray64()

Sub InitByArray64 ( InitKey() As  LongLong,
KeyLength As  Long 
)

Initialization with array of integers for random number generator (64 bit Mersenne Twister)

Purpose
Initializes the 64 bit Mersenne Twister (MT19937-64) random number generator with the array of integers.
The random number generator should be initialized by InitGenrand64() or InitByArray64() before generating random numbers.
Parameters
[in]InitKey()Array InitKey(LInitKey - 1) (LInitKey >= KeyLength)
Large seed in the integer array.
[in]KeyLengthLength of the array InitKey(). (KeyLength >= 1)
If KeyLength < 624, InitKey() gives the distinct random number sequence.
Note
If the random number generator is called without an initialization by InitGenrand64() or InitByArray64(), it will be automatically initialized by using 5489 as the seed.
This routine cannot be used on the 32 bit Excel.
Reference
Mersenne Twister Home Page
Example Program
See example of Genrand64Real1.