|
|
◆ InitByArray()
| Sub InitByArray |
( |
InitKey() As |
Long, |
|
|
KeyLength As |
Long |
|
) |
| |
Initialization with array of integers for random number generator (Mersenne Twister)
- Purpose
- Initializes the Mersenne Twister (MT19937) random number generator with the array of integers.
The random number generator should be initialized by InitGenrand() or InitByArray() before generating random numbers.
- Parameters
-
| [in] | InitKey() | Array InitKey(LInitKey - 1) (LInitKey >= KeyLength)
Large seed in the integer array. |
| [in] | KeyLength | Length 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 InitGenrand() or InitByArray(), it will be automatically initialized by using 5489 as the seed.
- Reference
- Mersenne Twister Home Page
- Example Program
- See example of GenrandRes53.
|