diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-10-13 14:25:39 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-10-13 14:25:39 -0400 |
| commit | 16e1ab7d22210385c40a61d25faba5aa31379609 (patch) | |
| tree | 1650fdb822b54de4ed965d952d13111c6c6a577c /spec | |
| parent | dfb0cbdd3bf318c5c6af2616560a140e48c8ccdd (diff) | |
Clarify shape requirements for π¨ in β’rand.Range
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/system.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/system.md b/spec/system.md index 15ada7b4..71d4fb9d 100644 --- a/spec/system.md +++ b/spec/system.md @@ -218,7 +218,7 @@ More accurately the modifier `β’_maxTime_` *may* fail if execution of `π½` ta | `Deal` | A simple random sample of `π¨β£π©` elements of `βπ©` | `Subset` | A sorted SRS of `βπ©`, with `π¨` elements if given -For each of these functions, `π©` is a natural number. For `Range`, `π¨` must be a valid shape if given, and for `Deal` and `Subset` it's a natural number less than or equal to `π©`. All selections are made uniformly at random, that is, each possible result is equally likely. A simple random sample (SRS) of `k` elements from list `s` is a list of `k` distinct elements of `s` in any order. Both the choice of elements and their ordering must be uniformly random. [Recommended algorithms](../implementation/primitive/random.md#simple-random-sample) for SRS selection are variants of a partial Knuth shuffle. +For each of these functions, `π©` is a natural number. For `Range`, `π¨` must be a valid shape (natural number, or list or unit array of natural numbers) if given, and for `Deal` and `Subset` it's a natural number less than or equal to `π©`. All selections are made uniformly at random, that is, each possible result is equally likely. A simple random sample (SRS) of `k` elements from list `s` is a list of `k` distinct elements of `s` in any order. Both the choice of elements and their ordering must be uniformly random. [Recommended algorithms](../implementation/primitive/random.md#simple-random-sample) for SRS selection are variants of a partial Knuth shuffle. When `π¨` isn't given, `Deal`'s result contains all elements of `βπ©`, making it a random shuffle of those values, or random permutation. In `Subset`, a random choice is made uniformly from the `2βπ©` subsets of `βπ©`, so that a subset of any length may be returned. |
