From Jason Turner

[rand.dist.samp]

Diff to HTML by rtfpessoa

tmp/tmpu2jyqmu0/{from.md → to.md} RENAMED
@@ -117,11 +117,11 @@ $$%
117
  The n+1 distribution parameters bᵢ, also known as this distribution’s
118
  *interval boundaries* , shall satisfy the relation bᵢ < bᵢ₊₁ for
119
  i = 0, …, n-1. Unless specified otherwise, the remaining n distribution
120
  parameters are calculated as: $$%
121
  \rho_k = \;
122
- {w_k \over {S \cdot (b_{k+1}-b_k)}}
123
  \; \mbox{ for } k = 0, \ldots, n\!-\!1,$$ in which the values wₖ,
124
  commonly known as the *weights* , shall be non-negative, non-NaN, and
125
  non-infinity. Moreover, the following relation shall hold:
126
  0 < S = w₀ + ⋯ + wₙ₋₁.
127
 
@@ -245,12 +245,12 @@ k = 0, …, n-1.
245
 
246
  A `piecewise_linear_distribution` random number distribution produces
247
  random numbers x, b₀ ≤ x < bₙ, distributed over each subinterval
248
  [ bᵢ, bᵢ₊₁ ) according to the probability density function $$%
249
  p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_n)
250
- = \rho_i \cdot {{b_{i+1} - x} \over {b_{i+1} - b_i}}
251
- + \rho_{i+1} \cdot {{x - b_i} \over {b_{i+1} - b_i}}
252
  \; \mbox{,}
253
  \mbox{ for } b_i \le x < b_{i+1}
254
  \; \mbox{.}$$
255
 
256
  The n+1 distribution parameters bᵢ, also known as this distribution’s
 
117
  The n+1 distribution parameters bᵢ, also known as this distribution’s
118
  *interval boundaries* , shall satisfy the relation bᵢ < bᵢ₊₁ for
119
  i = 0, …, n-1. Unless specified otherwise, the remaining n distribution
120
  parameters are calculated as: $$%
121
  \rho_k = \;
122
+ \frac{w_k}{S \cdot (b_{k+1}-b_k)}
123
  \; \mbox{ for } k = 0, \ldots, n\!-\!1,$$ in which the values wₖ,
124
  commonly known as the *weights* , shall be non-negative, non-NaN, and
125
  non-infinity. Moreover, the following relation shall hold:
126
  0 < S = w₀ + ⋯ + wₙ₋₁.
127
 
 
245
 
246
  A `piecewise_linear_distribution` random number distribution produces
247
  random numbers x, b₀ ≤ x < bₙ, distributed over each subinterval
248
  [ bᵢ, bᵢ₊₁ ) according to the probability density function $$%
249
  p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_n)
250
+ = \rho_i \cdot {\frac{b_{i+1} - x}{b_{i+1} - b_i}}
251
+ + \rho_{i+1} \cdot {\frac{x - b_i}{b_{i+1} - b_i}}
252
  \; \mbox{,}
253
  \mbox{ for } b_i \le x < b_{i+1}
254
  \; \mbox{.}$$
255
 
256
  The n+1 distribution parameters bᵢ, also known as this distribution’s