RandomTools
GetState
Get the state of the RandomTools Generator
Calling Sequence
Description
Examples
GetState( )
The GetState command returns the internal state of the pseudo-random number generator used by Generate. Currently the Mersenne Twister generator is used.
The state returned by GetState can be passed into SetState to regenerate a sequence of numbers.
with⁡RandomTools
AddFlavor,BlumBlumShub,Generate,GenerateSimilar,GenerateSimilarODE,GetFlavor,GetFlavors,GetState,HasFlavor,LinearCongruence,MersenneTwister,QuadraticCongruence,RandomExpand,RemoveFlavor,SetState
s≔GetState⁡
seq⁡Generate⁡integer,i=1..5
−104281139460,−306860183579,−477575829529,300187484465,−72447943125
SetState⁡state=s
See Also
rand
RandomTools[Generate]
RandomTools[MersenneTwister]
RandomTools[MersenneTwister][GetState]
RandomTools[SetState]
Download Help Document