From Jason Turner

[rand.dist.samp.plinear]

Diff to HTML by rtfpessoa

tmp/tmpcjeg95z6/{from.md → to.md} RENAMED
@@ -1,14 +1,10 @@
1
  ##### Class template `piecewise_linear_distribution` <a id="rand.dist.samp.plinear">[[rand.dist.samp.plinear]]</a>
2
 
3
  A `piecewise_linear_distribution` random number distribution produces
4
  random numbers x, b₀ ≤ x < bₙ, distributed over each subinterval
5
- [bᵢ, bᵢ₊₁) according to the probability density function
6
- $$p(x \,|\, b_0, \dotsc, b_n, \; \rho_0, \dotsc, \rho_n)
7
- = \rho_{i} \cdot {\frac{b_{i+1} - x}{b_{i+1} - b_i}}
8
- + \rho_{i+1} \cdot {\frac{x - b_i}{b_{i+1} - b_i}}
9
- \text{ , for $b_i \le x < b_{i+1}$.}$$
10
 
11
  The n + 1 distribution parameters bᵢ, also known as this distribution’s
12
  *interval boundaries* , shall satisfy the relation bᵢ < bᵢ₊₁ for
13
  i = 0, …, n - 1. Unless specified otherwise, the remaining n + 1
14
  distribution parameters are calculated as ρₖ = {wₖ / S} for k = 0, …, n,
@@ -78,12 +74,16 @@ n = 1, ρ₀ = ρ₁ = 1, b₀ = 0, and b₁ = 1.
78
  template<class InputIteratorB, class InputIteratorW>
79
  piecewise_linear_distribution(InputIteratorB firstB, InputIteratorB lastB,
80
  InputIteratorW firstW);
81
  ```
82
 
83
- *Mandates:* `is_invocable_r_v<double, UnaryOperation&, double>` is
84
- `true`.
 
 
 
 
85
 
86
  *Preconditions:* `InputIteratorB` and `InputIteratorW` each meet the
87
  *Cpp17InputIterator* requirements [[input.iterators]]. If
88
  `firstB == lastB` or `++firstB == lastB`, let n = 1, ρ₀ = ρ₁ = 1,
89
  b₀ = 0, and b₁ = 1. Otherwise, [`firstB`, `lastB`) forms a sequence b of
 
1
  ##### Class template `piecewise_linear_distribution` <a id="rand.dist.samp.plinear">[[rand.dist.samp.plinear]]</a>
2
 
3
  A `piecewise_linear_distribution` random number distribution produces
4
  random numbers x, b₀ ≤ x < bₙ, distributed over each subinterval
5
+ [bᵢ, bᵢ₊₁) according to the probability density function in .
 
 
 
 
6
 
7
  The n + 1 distribution parameters bᵢ, also known as this distribution’s
8
  *interval boundaries* , shall satisfy the relation bᵢ < bᵢ₊₁ for
9
  i = 0, …, n - 1. Unless specified otherwise, the remaining n + 1
10
  distribution parameters are calculated as ρₖ = {wₖ / S} for k = 0, …, n,
 
74
  template<class InputIteratorB, class InputIteratorW>
75
  piecewise_linear_distribution(InputIteratorB firstB, InputIteratorB lastB,
76
  InputIteratorW firstW);
77
  ```
78
 
79
+ *Mandates:* Both of
80
+
81
+ - `is_convertible_v<iterator_traits<InputIteratorB>::value_type, double>`
82
+ - `is_convertible_v<iterator_traits<InputIteratorW>::value_type, double>`
83
+
84
+ are `true`.
85
 
86
  *Preconditions:* `InputIteratorB` and `InputIteratorW` each meet the
87
  *Cpp17InputIterator* requirements [[input.iterators]]. If
88
  `firstB == lastB` or `++firstB == lastB`, let n = 1, ρ₀ = ρ₁ = 1,
89
  b₀ = 0, and b₁ = 1. Otherwise, [`firstB`, `lastB`) forms a sequence b of