pRNG, type
Source: /avail/Avail/Data Abstractions/Pseudorandom Number Generation/Abstract Random
Categories: Data Abstractions, Random
Consume a pseudorandom value from the specified generator and use it to select an instance of the specified
enum
.
Position | Name | Type | Description | |
---|---|---|---|---|
Parameters | ||||
1 | rng | pRNG | A pseudorandom number generator. | |
2 | enum | type | ||
Returns | any | A pseudorandomly selected instance of enum. |
pRNG, whole number's type
Source: /avail/Avail/Data Abstractions/Pseudorandom Number Generation/Abstract Random
Categories: Data Abstractions, Random
Consume and answer a pseudorandom value from the specified generator.
Position | Name | Type | Description | |
---|---|---|---|---|
Parameters | ||||
1 | rng | pRNG | A pseudorandom number generator. | |
2 | range | whole number's type |
A subtype of the generator's _'s⁇element type . The result will lie within this range.
|
|
Returns | whole number | A pseudorandom value that is an instance of range. | Raises | |
incorrect-argument-type exception | If ⎡{@param range }⎤ is ∞. |