RandomTools[LinearCongruence][GenerateInteger] - Generate an integer using the Linear Congruence 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 LinearCongruence algorithm.
|
•
|
When generating a large number of random integers it is faster to create a generating procedure by calling NewGenerator than to call GenerateInteger multiple times.
|
•
|
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 will be chosen from that range. If the value of the range argument is an integer, then the integer will be take from [0,range). The default value is .
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Download Help Document
Was this information helpful?