RandomTools[LinearCongruence]
GetState
Get the internal state of the Linear Congruence Generator
Calling Sequence
Description
Examples
GetState( )
The GetState command returns the internal state of the Linear Congruence pseudo-random number generator. The state is an integer.
The state returned by GetState can be passed into SetState to regenerate a sequence of numbers.
with⁡RandomToolsLinearCongruence
GenerateInteger,GetState,NewGenerator,SetState
s≔GetState⁡
s≔1
seq⁡GenerateInteger⁡,i=1..5
427419669081,321110693270,343633073697,474256143563,558458718976
SetState⁡state=s
See Also
rand
RandomTools
RandomTools[Generate]
RandomTools[GetState]
RandomTools[LinearCongruence][GenerateInteger]
RandomTools[LinearCongruence][SetState]
RandomTools[SetState]
Download Help Document