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

# Online Help

###### All Products    Maple    MapleSim

RandomTools[MersenneTwister]

 GenerateData
 Generate a list of integers using the Mersenne Twister Generator

 Calling Sequence GenerateInteger( range, n )

Parameters

 range - posint or range of integers; specify the range of values to sample from n - posint; the list size

Description

 • The GenerateData command outputs a sequence of integers, generated using the MersenneTwister algorithm.
 • When generating a large number of random integers it is faster to create a generating procedure by calling NewGenerator than to call GenerateInteger.
 If the value of the range argument is a range, then the integer is chosen from that range.  If the value of the range argument is an integer, then the integer is chosen from the range 0..value-1.

Examples

 > $\mathrm{with}\left({\mathrm{RandomTools}}_{\mathrm{MersenneTwister}}\right):$
 > $\mathrm{GenerateData}\left(1..10,10\right)$
 ${7}{,}{10}{,}{6}{,}{2}{,}{4}{,}{6}{,}{5}{,}{1}{,}{8}{,}{5}$ (1)
 > $\mathrm{GenerateData}\left(100,5\right)$
 ${50}{,}{20}{,}{18}{,}{84}{,}{11}$ (2)

Compatibility

 • The RandomTools[MersenneTwister][GenerateData] command was updated in Maple 2017.