|
2980 | 2980 | of \state{x}{i}
|
2981 | 2981 | consists of
|
2982 | 2982 | the values of
|
2983 |
| - $X_{i-n}, \ldots, X_{i-1}$, |
| 2983 | + $X_{i-n}, \dotsc, X_{i-1}$, |
2984 | 2984 | in that order.
|
2985 | 2985 |
|
2986 | 2986 | \indexlibrary{\idxcode{mersenne_twister_engine}!constructor}%
|
|
2991 | 2991 | \begin{itemdescr}
|
2992 | 2992 | \pnum\effects Constructs a \tcode{mersenne_twister_engine} object.
|
2993 | 2993 | Sets $X_{-n}$ to $\tcode{value} \bmod 2^w$.
|
2994 |
| - Then, iteratively for $i = 1\!-\!n,\ldots,-1$, |
| 2994 | + Then, iteratively for $i = 1\!-\!n,\dotsc,-1$, |
2995 | 2995 | sets $X_i$
|
2996 | 2996 | to
|
2997 | 2997 | \[%
|
|
3018 | 3018 | and $a$ an array (or equivalent)
|
3019 | 3019 | of length $ n \cdot k $,
|
3020 | 3020 | invokes \tcode{q.generate($a+0$, $a+n \cdot k$)}
|
3021 |
| - and then, iteratively for $i = -n,\ldots,-1$, |
| 3021 | + and then, iteratively for $i = -n,\dotsc,-1$, |
3022 | 3022 | sets $X_i$
|
3023 | 3023 | to $ \left(\sum_{j=0}^{k-1}a_{k(i+n)+j} \cdot 2^{32j} \right) \bmod 2^w $.
|
3024 | 3024 | Finally,
|
|
3135 | 3135 | \indextext{\idxcode{subtract_with_carry_engine}!textual representation}%
|
3136 | 3136 | \indextext{textual representation!\idxcode{subtract_with_carry_engine}}
|
3137 | 3137 | consists of the values of
|
3138 |
| - $X_{i-r}, \ldots, X_{i-1}$, |
| 3138 | + $X_{i-r}, \dotsc, X_{i-1}$, |
3139 | 3139 | in that order, followed by $c$.
|
3140 | 3140 |
|
3141 | 3141 |
|
|
3147 | 3147 | \begin{itemdescr}
|
3148 | 3148 | \pnum\effects Constructs a \tcode{subtract_with_carry_engine} object.
|
3149 | 3149 | Sets the values of
|
3150 |
| - $ X_{-r}, \ldots, X_{-1} $, |
| 3150 | + $ X_{-r}, \dotsc, X_{-1} $, |
3151 | 3151 | in that order, as specified below.
|
3152 | 3152 | If $X_{-1}$ is then $0$,
|
3153 | 3153 | sets $c$ to $1$;
|
|
3161 | 3161 | 40014u,0u,2147483563u> e(value == 0u ? default_seed : value);
|
3162 | 3162 | \end{codeblock}
|
3163 | 3163 | Then, to set each $X_k$,
|
3164 |
| - obtain new values $ z_0, \ldots, z_{n-1} $ |
| 3164 | + obtain new values $ z_0, \dotsc, z_{n-1} $ |
3165 | 3165 | from $n = \lceil w/32 \rceil $ successive invocations
|
3166 | 3166 | of \tcode{e} taken modulo $2^{32}$.
|
3167 | 3167 | Set $X_k$ to $ \left( \sum_{j=0}^{n-1} z_j \cdot 2^{32j}\right) \bmod m$.
|
|
3184 | 3184 | and $a$ an array (or equivalent)
|
3185 | 3185 | of length $ r \cdot k $,
|
3186 | 3186 | invokes \tcode{q.generate($a+0$, $a+r \cdot k$)}
|
3187 |
| - and then, iteratively for $i = -r, \ldots, -1$, |
| 3187 | + and then, iteratively for $i = -r, \dotsc, -1$, |
3188 | 3188 | sets $X_i$
|
3189 | 3189 | to $ \left(\sum_{j=0}^{k-1}a_{k(i+r)+j} \cdot 2^{32j} \right) \bmod m $.
|
3190 | 3190 | If $X_{-1}$ is then $0$,
|
|
3604 | 3604 | each constructor%
|
3605 | 3605 | \indexlibrary{\idxcode{shuffle_order_engine}!constructor}
|
3606 | 3606 | that is not a copy constructor
|
3607 |
| -initializes $\tcode{V[0]}, \ldots, \tcode{V[k-1]}$ and $Y$, |
| 3607 | +initializes $\tcode{V[0]}, \dotsc, \tcode{V[k-1]}$ and $Y$, |
3608 | 3608 | in that order,
|
3609 | 3609 | with values returned by successive invocations of \tcode{e()}.%
|
3610 | 3610 | \indextext{random number generation!engines|)}
|
|
3879 | 3879 | returns $0.0$.
|
3880 | 3880 | Otherwise, returns an entropy estimate\footnote{If a device has $n$ states
|
3881 | 3881 | whose respective probabilities are
|
3882 |
| - $ P_0, \ldots, P_{n-1} $, |
| 3882 | + $ P_0, \dotsc, P_{n-1} $, |
3883 | 3883 | the device entropy $S$ is defined as\\
|
3884 | 3884 | $ S = - \sum_{i=0}^{n-1} P_i \cdot \log P_i $.}
|
3885 | 3885 | for the random numbers returned by \tcode{operator()},
|
|
4050 | 4050 | \item
|
4051 | 4051 | With $m$ as the larger of $s + 1$ and $n$,
|
4052 | 4052 | transform the elements of the range:
|
4053 |
| - iteratively for $ k = 0, \ldots, m-1 $, |
| 4053 | + iteratively for $ k = 0, \dotsc, m-1 $, |
4054 | 4054 | calculate values
|
4055 | 4055 | \begin{eqnarray*}
|
4056 | 4056 | r_1 & = &
|
|
4077 | 4077 | \item
|
4078 | 4078 | Transform the elements of the range again,
|
4079 | 4079 | beginning where the previous step ended:
|
4080 |
| - iteratively for $ k = m, \ldots, m\!+\!n\!-\!1 $, |
| 4080 | + iteratively for $ k = m, \dotsc, m\!+\!n\!-\!1 $, |
4081 | 4081 | calculate values
|
4082 | 4082 | \begin{eqnarray*}
|
4083 | 4083 | r_3 & = &
|
|
4195 | 4195 |
|
4196 | 4196 | \pnum\effects
|
4197 | 4197 | Invokes \tcode{g()} $k$ times
|
4198 |
| - to obtain values $ g_0, \ldots, g_{k-1} $, respectively. |
| 4198 | + to obtain values $ g_0, \dotsc, g_{k-1} $, respectively. |
4199 | 4199 | Calculates a quantity
|
4200 | 4200 | \[
|
4201 | 4201 | S = \sum_{i=0}^{k-1} (g_i - \tcode{g.min()})
|
|
5782 | 5782 | \indextext{discrete probability function!\idxcode{discrete_distribution}}%
|
5783 | 5783 | \indextext{\idxcode{discrete_distribution}!discrete probability function}%
|
5784 | 5784 | \[%
|
5785 |
| - P(i\,|\,p_0,\ldots,p_{n-1}) |
| 5785 | + P(i\,|\,p_0,\dotsc,p_{n-1}) |
5786 | 5786 | = p_i
|
5787 | 5787 | \; \mbox{.}
|
5788 | 5788 | \]
|
5789 | 5789 |
|
5790 | 5790 | \pnum
|
5791 | 5791 | Unless specified otherwise,
|
5792 | 5792 | the distribution parameters are calculated as:
|
5793 |
| - $p_k = {w_k / S} \; \mbox{ for } k = 0, \ldots, n\!-\!1$ , |
| 5793 | + $p_k = {w_k / S} \; \mbox{ for } k = 0, \dotsc, n\!-\!1$ , |
5794 | 5794 | in which
|
5795 | 5795 | the values $w_k$,
|
5796 | 5796 | commonly known as the \techterm{weights}%
|
|
5910 | 5910 | let $ w_0 = 1 $.
|
5911 | 5911 | Otherwise,
|
5912 | 5912 | let $ w_k = \tcode{fw}(\tcode{xmin} + k \cdot \delta + \delta / 2) $
|
5913 |
| - for $ k = 0, \ldots, n\!-\!1 $. |
| 5913 | + for $ k = 0, \dotsc, n\!-\!1 $. |
5914 | 5914 |
|
5915 | 5915 | \pnum\complexity
|
5916 | 5916 | The number of invocations of \tcode{fw} shall not exceed $n$.
|
|
5925 | 5925 | \pnum\returns A \tcode{vector<double>}
|
5926 | 5926 | whose \tcode{size} member returns $n$
|
5927 | 5927 | and whose $ \tcode{operator[]} $ member returns $p_k$
|
5928 |
| - when invoked with argument $k$ for $k = 0, \ldots, n\!-\!1 $. |
| 5928 | + when invoked with argument $k$ for $k = 0, \dotsc, n\!-\!1 $. |
5929 | 5929 | \end{itemdescr}
|
5930 | 5930 |
|
5931 | 5931 |
|
|
5947 | 5947 | \indextext{probability density function!\idxcode{piecewise_constant_distribution}}%
|
5948 | 5948 | \indextext{\idxcode{piecewise_constant_distribution}!probability density function}%
|
5949 | 5949 | \[%
|
5950 |
| - p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_{n-1}) |
| 5950 | + p(x\,|\,b_0,\dotsc,b_n,\;\rho_0,\dotsc,\rho_{n-1}) |
5951 | 5951 | = \rho_i
|
5952 | 5952 | \; \mbox{,}
|
5953 | 5953 | \mbox{ for } b_i \le x < b_{i+1}
|
|
5961 | 5961 | \indextext{interval boundaries!\idxcode{piecewise_constant_distribution}}%
|
5962 | 5962 | , shall satisfy the relation
|
5963 | 5963 | $ b_i < b_{i+1} $
|
5964 |
| -for $i = 0, \ldots, n\!-\!1 $. |
| 5964 | +for $i = 0, \dotsc, n\!-\!1 $. |
5965 | 5965 | Unless specified otherwise,
|
5966 | 5966 | the remaining $n$ distribution parameters are calculated as:
|
5967 | 5967 | \[%
|
5968 | 5968 | \rho_k = \;
|
5969 | 5969 | \frac{w_k}{S \cdot (b_{k+1}-b_k)}
|
5970 |
| - \; \mbox{ for } k = 0, \ldots, n\!-\!1, |
| 5970 | + \; \mbox{ for } k = 0, \dotsc, n\!-\!1, |
5971 | 5971 | \]
|
5972 | 5972 | in which the values $w_k$,
|
5973 | 5973 | commonly known as the \techterm{weights}%
|
|
6089 | 6089 | and $ b_1 = 1 $.
|
6090 | 6090 | Otherwise,
|
6091 | 6091 | let $\bigl[\tcode{bl.begin()}, \tcode{bl.end()}\bigr)$
|
6092 |
| - form a sequence $ b_0, \ldots, b_n $, |
| 6092 | + form a sequence $ b_0, \dotsc, b_n $, |
6093 | 6093 | and
|
6094 | 6094 | let $ w_k = \tcode{fw}\bigl(\bigl(b_{k+1} + b_k\bigr) / 2\bigr) $
|
6095 |
| - for $ k = 0, \ldots, n\!-\!1 $. |
| 6095 | + for $ k = 0, \dotsc, n\!-\!1 $. |
6096 | 6096 |
|
6097 | 6097 | \pnum\complexity
|
6098 | 6098 | The number of invocations of \tcode{fw} shall not exceed $n$.
|
|
6120 | 6120 | \pnum\effects Constructs a \tcode{piecewise_constant_distribution} object
|
6121 | 6121 | with parameters taken or calculated
|
6122 | 6122 | from the following values:
|
6123 |
| - Let $ b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \ldots, n $, |
6124 |
| - and $ w_k = \tcode{fw}(b_k + \delta / 2) $ for $ k = 0, \ldots, n\!-\!1 $. |
| 6123 | + Let $ b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \dotsc, n $, |
| 6124 | + and $ w_k = \tcode{fw}(b_k + \delta / 2) $ for $ k = 0, \dotsc, n\!-\!1 $. |
6125 | 6125 |
|
6126 | 6126 | \pnum\complexity
|
6127 | 6127 | The number of invocations of \tcode{fw} shall not exceed $n$.
|
|
6136 | 6136 | \pnum\returns A \tcode{vector<result_type>}
|
6137 | 6137 | whose \tcode{size} member returns $n + 1$
|
6138 | 6138 | and whose $ \tcode{operator[]} $ member returns $b_k$
|
6139 |
| - when invoked with argument $k$ for $k = 0, \ldots, n $. |
| 6139 | + when invoked with argument $k$ for $k = 0, \dotsc, n $. |
6140 | 6140 | \end{itemdescr}
|
6141 | 6141 |
|
6142 | 6142 | \indexlibrarymember{densities}{piecewise_constant_distribution}%
|
|
6148 | 6148 | \pnum\returns A \tcode{vector<result_type>}
|
6149 | 6149 | whose \tcode{size} member returns $n$
|
6150 | 6150 | and whose $ \tcode{operator[]} $ member returns $\rho_k$
|
6151 |
| - when invoked with argument $k$ for $k = 0, \ldots, n\!-\!1 $. |
| 6151 | + when invoked with argument $k$ for $k = 0, \dotsc, n\!-\!1 $. |
6152 | 6152 | \end{itemdescr}
|
6153 | 6153 |
|
6154 | 6154 |
|
|
6170 | 6170 | \indextext{probability density function!\idxcode{piecewise_linear_distribution}}%
|
6171 | 6171 | \indextext{\idxcode{piecewise_linear_distribution}!probability density function}%
|
6172 | 6172 | \[%
|
6173 |
| - p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_n) |
| 6173 | + p(x\,|\,b_0,\dotsc,b_n,\;\rho_0,\dotsc,\rho_n) |
6174 | 6174 | = \rho_i \cdot {\frac{b_{i+1} - x}{b_{i+1} - b_i}}
|
6175 | 6175 | + \rho_{i+1} \cdot {\frac{x - b_i}{b_{i+1} - b_i}}
|
6176 | 6176 | \; \mbox{,}
|
|
6185 | 6185 | \indextext{interval boundaries!\idxcode{piecewise_linear_distribution}}%
|
6186 | 6186 | , shall satisfy the relation
|
6187 | 6187 | $ b_i < b_{i+1} $
|
6188 |
| -for $i = 0, \ldots, n\!-\!1 $. |
| 6188 | +for $i = 0, \dotsc, n\!-\!1 $. |
6189 | 6189 | Unless specified otherwise,
|
6190 | 6190 | the remaining $n+1$ distribution parameters are calculated as
|
6191 |
| -$ \rho_k = {w_k / S} \; \mbox{ for } k = 0, \ldots, n $, |
| 6191 | +$ \rho_k = {w_k / S} \; \mbox{ for } k = 0, \dotsc, n $, |
6192 | 6192 | in which the values $w_k$,
|
6193 | 6193 | commonly known as the \techterm{weights at boundaries}%
|
6194 | 6194 | \indextext{\idxcode{piecewise_linear_distribution}!weights at boundaries}%
|
|
6310 | 6310 | and $ b_1 = 1 $.
|
6311 | 6311 | Otherwise,
|
6312 | 6312 | let $\bigl[\tcode{bl.begin(),} \tcode{bl.end()}\bigr)$
|
6313 |
| - form a sequence $ b_0, \ldots, b_n $, |
| 6313 | + form a sequence $ b_0, \dotsc, b_n $, |
6314 | 6314 | and
|
6315 | 6315 | let $ w_k = \tcode{fw}(b_k) $
|
6316 |
| - for $ k = 0, \ldots, n $. |
| 6316 | + for $ k = 0, \dotsc, n $. |
6317 | 6317 |
|
6318 | 6318 | \pnum\complexity
|
6319 | 6319 | The number of invocations of \tcode{fw} shall not exceed $n+1$.
|
|
6341 | 6341 | \pnum\effects Constructs a \tcode{piecewise_linear_distribution} object
|
6342 | 6342 | with parameters taken or calculated
|
6343 | 6343 | from the following values:
|
6344 |
| - Let $ b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \ldots, n $, |
6345 |
| - and $ w_k = \tcode{fw}(b_k) $ for $ k = 0, \ldots, n $. |
| 6344 | + Let $ b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \dotsc, n $, |
| 6345 | + and $ w_k = \tcode{fw}(b_k) $ for $ k = 0, \dotsc, n $. |
6346 | 6346 |
|
6347 | 6347 | \pnum\complexity
|
6348 | 6348 | The number of invocations of \tcode{fw} shall not exceed $n+1$.
|
|
6357 | 6357 | \pnum\returns A \tcode{vector<result_type>}
|
6358 | 6358 | whose \tcode{size} member returns $n + 1$
|
6359 | 6359 | and whose $ \tcode{operator[]} $ member returns $b_k$
|
6360 |
| - when invoked with argument $k$ for $k = 0, \ldots, n $. |
| 6360 | + when invoked with argument $k$ for $k = 0, \dotsc, n $. |
6361 | 6361 | \end{itemdescr}
|
6362 | 6362 |
|
6363 | 6363 | \indexlibrarymember{densities}{piecewise_linear_distribution}%
|
|
6369 | 6369 | \pnum\returns A \tcode{vector<result_type>}
|
6370 | 6370 | whose \tcode{size} member returns $n$
|
6371 | 6371 | and whose $ \tcode{operator[]} $ member returns $\rho_k$
|
6372 |
| - when invoked with argument $k$ for $ k = 0, \ldots, n $. |
| 6372 | + when invoked with argument $k$ for $ k = 0, \dotsc, n $. |
6373 | 6373 | \end{itemdescr}%
|
6374 | 6374 | %
|
6375 | 6375 | \indextext{random number distributions!sampling|)}%
|
|
0 commit comments