RandomTools[MersenneTwister][SetState] - Set the internal state of the Mersenne Twister Generator
|
Calling Sequence
|
|
SetState( option )
|
|
Parameters
|
|
option
|
-
|
(optional) argument of the form option=value where option is state
|
|
|
|
|
Description
|
|
•
|
The SetState command sets the state of the internal Mersenne Twister random number generator.
|
•
|
A state returned by GetState can be passed into SetState to regenerate a sequence of numbers.
|
•
|
SetState accepts one optional argument, state.
|
|
The state argument specifies the data used to set the state of the generator. If the value of state is an integer, then the integer is used to seed the state. If the value of state is an rtable that was returned by GetState, then the state is set to the value stored in the rtable. If the state argument is not given then the state is seeded using values taken from the system.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
>
|
|
| (4) |
>
|
|
>
|
|
| (5) |
>
|
|
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?