RandomTools[MersenneTwister][GenerateInteger] - Generate an integer using the Mersenne Twister Generator
|
Calling Sequence
|
|
GenerateInteger( opt1, opt2, ... )
|
|
Parameters
|
|
opt1, opt2, ...
|
-
|
(optional) argument of the form option=value where option is range
|
|
|
|
|
Description
|
|
•
|
The GenerateInteger command outputs a pseudo-random integer, 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.
|
•
|
The following optional arguments are supported. They are input as equations in any order.
|
•
|
range=integer..integer or integer
|
|
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. The default value is .
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Download Help Document
Was this information helpful?