RandomTools[SetState] - Set the internal state of the RandomTools 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 pseudo-random number generator used by Generate. Currently the Mersenne Twister generator is used.
|
•
|
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. This argument is passed on to the SetState method of the underlying pseudo-random number generator. Currently the MersenneTwister[SetState] function is called. 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?