RandomTools[LinearCongruence] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Random Objects : RandomTools package : LinearCongruence Subpackage : RandomTools/LinearCongruence/GetState

RandomTools[LinearCongruence]

  

GetState

  

Get the internal state of the Linear Congruence Generator

 

Calling Sequence

Description

Examples

Calling Sequence

GetState( )

Description

• 

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.

Examples

withRandomTools[LinearCongruence]

GenerateInteger,GetState,NewGenerator,SetState

(1)

sGetState

s:=1

(2)

seqGenerateInteger,i=1..5

427419669081,321110693270,343633073697,474256143563,558458718976

(3)

SetStatestate=s

seqGenerateInteger,i=1..5

427419669081,321110693270,343633073697,474256143563,558458718976

(4)

See Also

rand

RandomTools

RandomTools[Generate]

RandomTools[GetState]

RandomTools[LinearCongruence]

RandomTools[LinearCongruence][GenerateInteger]

RandomTools[LinearCongruence][SetState]

RandomTools[SetState]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam