GetState - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


RandomTools

  

GetState

  

Get the state of the RandomTools Generator

 

Calling Sequence

Description

Examples

Calling Sequence

GetState( )

Description

• 

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.

Examples

withRandomTools

AddFlavor,BlumBlumShub,Generate,GenerateSimilar,GenerateSimilarODE,GetFlavor,GetFlavors,GetState,HasFlavor,LinearCongruence,MersenneTwister,QuadraticCongruence,RandomExpand,RemoveFlavor,SetState

(1)

sGetState

seqGenerateinteger,i=1..5

−104281139460,−306860183579,−477575829529,300187484465,−72447943125

(2)

SetStatestate=s

seqGenerateinteger,i=1..5

−104281139460,−306860183579,−477575829529,300187484465,−72447943125

(3)

See Also

rand

RandomTools

RandomTools[Generate]

RandomTools[MersenneTwister]

RandomTools[MersenneTwister][GetState]

RandomTools[SetState]