tmp/tmpja2ecs28/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
##### Class template `discrete_distribution` <a id="rand.dist.samp.discrete">[[rand.dist.samp.discrete]]</a>
|
| 2 |
|
| 3 |
A `discrete_distribution` random number distribution produces random
|
| 4 |
integers i, 0 ≤ i < n, distributed according to the discrete probability
|
| 5 |
-
function
|
| 6 |
|
| 7 |
Unless specified otherwise, the distribution parameters are calculated
|
| 8 |
as: pₖ = {wₖ / S} for k = 0, …, n - 1, in which the values wₖ, commonly
|
| 9 |
known as the *weights* , shall be non-negative, non-NaN, and
|
| 10 |
non-infinity. Moreover, the following relation shall hold:
|
|
@@ -79,11 +79,11 @@ is `true`.
|
|
| 79 |
requirements [[input.iterators]]. If `firstW == lastW`, let n = 1 and
|
| 80 |
w₀ = 1. Otherwise, [`firstW`, `lastW`) forms a sequence w of length
|
| 81 |
n > 0.
|
| 82 |
|
| 83 |
*Effects:* Constructs a `discrete_distribution` object with
|
| 84 |
-
probabilities given by the
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
discrete_distribution(initializer_list<double> wl);
|
| 88 |
```
|
| 89 |
|
|
|
|
| 1 |
##### Class template `discrete_distribution` <a id="rand.dist.samp.discrete">[[rand.dist.samp.discrete]]</a>
|
| 2 |
|
| 3 |
A `discrete_distribution` random number distribution produces random
|
| 4 |
integers i, 0 ≤ i < n, distributed according to the discrete probability
|
| 5 |
+
function in .
|
| 6 |
|
| 7 |
Unless specified otherwise, the distribution parameters are calculated
|
| 8 |
as: pₖ = {wₖ / S} for k = 0, …, n - 1, in which the values wₖ, commonly
|
| 9 |
known as the *weights* , shall be non-negative, non-NaN, and
|
| 10 |
non-infinity. Moreover, the following relation shall hold:
|
|
|
|
| 79 |
requirements [[input.iterators]]. If `firstW == lastW`, let n = 1 and
|
| 80 |
w₀ = 1. Otherwise, [`firstW`, `lastW`) forms a sequence w of length
|
| 81 |
n > 0.
|
| 82 |
|
| 83 |
*Effects:* Constructs a `discrete_distribution` object with
|
| 84 |
+
probabilities given by the .
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
discrete_distribution(initializer_list<double> wl);
|
| 88 |
```
|
| 89 |
|