|
1389 | 1389 | \pnum
|
1390 | 1390 | In addition to a few utilities,
|
1391 | 1391 | four categories of entities are described:
|
1392 |
| -\techterm{uniform random bit generators}, |
1393 |
| -\techterm{random number engines}, |
1394 |
| -\techterm{random number engine adaptors}, |
| 1392 | +\term{uniform random bit generators}, |
| 1393 | +\term{random number engines}, |
| 1394 | +\term{random number engine adaptors}, |
1395 | 1395 | and
|
1396 |
| -\techterm{random number distributions}. |
| 1396 | +\term{random number distributions}. |
1397 | 1397 | These categorizations are applicable
|
1398 | 1398 | to types that satisfy the corresponding requirements,
|
1399 | 1399 | to objects instantiated from such types,
|
|
1419 | 1419 | that entity is characterized:
|
1420 | 1420 | \begin{enumeratea}
|
1421 | 1421 | \item
|
1422 |
| - as \techterm{boolean} or equivalently as \techterm{boolean-valued}, |
| 1422 | + as \term{boolean} or equivalently as \term{boolean-valued}, |
1423 | 1423 | if \tcode{T} is \tcode{bool};
|
1424 | 1424 | \item
|
1425 | 1425 | otherwise
|
1426 |
| - as \techterm{integral} or equivalently as \techterm{integer-valued}, |
| 1426 | + as \term{integral} or equivalently as \term{integer-valued}, |
1427 | 1427 | if \tcode{numeric_limits<T>::is_integer} is \tcode{true};
|
1428 | 1428 | \item
|
1429 | 1429 | otherwise
|
1430 |
| - as \techterm{floating} or equivalently as \techterm{real-valued}. |
| 1430 | + as \term{floating} or equivalently as \term{real-valued}. |
1431 | 1431 | \end{enumeratea}
|
1432 | 1432 | \noindent
|
1433 | 1433 | If integer-valued,
|
1434 | 1434 | an entity may optionally be further characterized as
|
1435 |
| -\techterm{signed} or \techterm{unsigned}, |
| 1435 | +\term{signed} or \term{unsigned}, |
1436 | 1436 | according to \tcode{numeric_limits<T>::is_signed}.
|
1437 | 1437 |
|
1438 | 1438 | \pnum
|
|
1560 | 1560 | \indextext{requirements!seed sequence|(}
|
1561 | 1561 |
|
1562 | 1562 | \pnum
|
1563 |
| - A \techterm{seed sequence}\indextext{seed sequence} |
| 1563 | + A \term{seed sequence}\indextext{seed sequence} |
1564 | 1564 | is an object
|
1565 | 1565 | that consumes a sequence
|
1566 | 1566 | of integer-valued data
|
|
1701 | 1701 | \indextext{requirements!uniform random bit generator|(}
|
1702 | 1702 |
|
1703 | 1703 | \pnum
|
1704 |
| -A \techterm{uniform random bit generator} |
| 1704 | +A \term{uniform random bit generator} |
1705 | 1705 | \tcode{g} of type \tcode{G}
|
1706 | 1706 | is a function object
|
1707 | 1707 | returning unsigned integer values
|
|
1718 | 1718 | \pnum
|
1719 | 1719 | A class \tcode{G}
|
1720 | 1720 | satisfies the requirements
|
1721 |
| -of a \techterm{uniform random bit generator} |
| 1721 | +of a \term{uniform random bit generator} |
1722 | 1722 | if the expressions shown
|
1723 | 1723 | in \tref{UniformRandomBitGenerator}
|
1724 | 1724 | are valid and have the indicated semantics,
|
|
1795 | 1795 | \indextext{requirements!random number engine|(}
|
1796 | 1796 |
|
1797 | 1797 | \pnum
|
1798 |
| -A \techterm{random number engine} |
1799 |
| -(commonly shortened to \techterm{engine}) |
| 1798 | +A \term{random number engine} |
| 1799 | +(commonly shortened to \term{engine}) |
1800 | 1800 | \tcode{e} of type \tcode{E}
|
1801 | 1801 | is a uniform random bit generator
|
1802 | 1802 | that additionally meets the requirements
|
|
1824 | 1824 | in multiples of the size of \tcode{result_type},
|
1825 | 1825 | given as an integral constant expression;
|
1826 | 1826 | \item
|
1827 |
| - the \techterm{transition algorithm} |
| 1827 | + the \term{transition algorithm} |
1828 | 1828 | $\mathsf{TA}$
|
1829 | 1829 | by which \tcode{e}'s state \state{e}{i}
|
1830 |
| - is advanced to its \techterm{successor state} |
| 1830 | + is advanced to its \term{successor state} |
1831 | 1831 | \state{e}{i+1};
|
1832 | 1832 | and
|
1833 | 1833 | \item
|
1834 |
| - the \techterm{generation algorithm} |
| 1834 | + the \term{generation algorithm} |
1835 | 1835 | $\mathsf{GA}$
|
1836 | 1836 | by which an engine's state is mapped
|
1837 | 1837 | to a value of type \tcode{result_type}.
|
|
1842 | 1842 | that satisfies the requirements
|
1843 | 1843 | of a uniform random bit generator\iref{rand.req.urng}
|
1844 | 1844 | also satisfies the requirements
|
1845 |
| -of a \techterm{random number engine} |
| 1845 | +of a \term{random number engine} |
1846 | 1846 | if the expressions shown
|
1847 | 1847 | in \tref{RandomEngine}
|
1848 | 1848 | are valid and have the indicated semantics,
|
|
2068 | 2068 | \rSec3[rand.req.adapt]{Random number engine adaptor requirements}%
|
2069 | 2069 |
|
2070 | 2070 | \pnum
|
2071 |
| -A \techterm{random number engine adaptor} |
2072 |
| -(commonly shortened to \techterm{adaptor}) |
| 2071 | +A \term{random number engine adaptor} |
| 2072 | +(commonly shortened to \term{adaptor}) |
2073 | 2073 | \tcode{a} of type \tcode{A}
|
2074 | 2074 | is a random number engine
|
2075 | 2075 | that takes values
|
|
2078 | 2078 | in order to deliver a sequence of values
|
2079 | 2079 | with different randomness properties.
|
2080 | 2080 | An engine \tcode{b} of type \tcode{B} adapted in this way
|
2081 |
| -is termed a \techterm{base engine} |
| 2081 | +is termed a \term{base engine} |
2082 | 2082 | in this context.
|
2083 | 2083 | The expression \tcode{a.base()} shall be valid and shall return a
|
2084 | 2084 | const reference to \tcode{a}'s base engine.
|
|
2194 | 2194 | \indextext{requirements!random number distribution|(}
|
2195 | 2195 |
|
2196 | 2196 | \pnum
|
2197 |
| -A \techterm{random number distribution} |
2198 |
| -(commonly shortened to \techterm{distribution}) |
| 2197 | +A \term{random number distribution} |
| 2198 | +(commonly shortened to \term{distribution}) |
2199 | 2199 | \tcode{d} of type \tcode{D}
|
2200 | 2200 | is a function object
|
2201 | 2201 | returning values
|
2202 | 2202 | that are distributed according to
|
2203 |
| -an associated mathematical \techterm{probability density function} |
| 2203 | +an associated mathematical \term{probability density function} |
2204 | 2204 | $p(z)$
|
2205 | 2205 | or according to
|
2206 |
| -an associated \techterm{discrete probability function} |
| 2206 | +an associated \term{discrete probability function} |
2207 | 2207 | $P(z_i)$.
|
2208 | 2208 | A distribution's specification
|
2209 | 2209 | identifies its associated probability function
|
|
2212 | 2212 | \pnum
|
2213 | 2213 | An associated probability function is typically expressed
|
2214 | 2214 | using certain externally-supplied quantities
|
2215 |
| -known as the \techterm{parameters of the distribution}. |
| 2215 | +known as the \term{parameters of the distribution}. |
2216 | 2216 | Such distribution parameters are identified
|
2217 | 2217 | in this context by writing, for example,
|
2218 | 2218 | $p(z\,|\,a,b)$ or $P(z_i\,|\,a,b)$,
|
|
2225 | 2225 | \pnum
|
2226 | 2226 | A class \tcode{D}
|
2227 | 2227 | satisfies the requirements
|
2228 |
| -of a \techterm{random number distribution} |
| 2228 | +of a \term{random number distribution} |
2229 | 2229 | if the expressions shown
|
2230 | 2230 | in \tref{RandomDistribution}
|
2231 | 2231 | are valid and have the indicated semantics,
|
|
2868 | 2868 | defined by shift values $n$ and $m$, a twist value $r$,
|
2869 | 2869 | and a conditional xor-mask $a$.
|
2870 | 2870 | To improve the uniformity of the result,
|
2871 |
| -the bits of the raw shift register are additionally \techterm{tempered} |
| 2871 | +the bits of the raw shift register are additionally \term{tempered} |
2872 | 2872 | (i.e., scrambled) according to a bit-scrambling matrix
|
2873 | 2873 | defined by values $u$, $d$, $s$, $b$, $t$, $c$, and $\ell$.
|
2874 | 2874 |
|
|
3039 | 3039 | all subscripts applied to $X$ are to be taken modulo $r$.
|
3040 | 3040 | The state \state{x}{i}
|
3041 | 3041 | additionally consists of an integer $c$
|
3042 |
| -(known as the \techterm{carry})% |
| 3042 | +(known as the \term{carry})% |
3043 | 3043 | \indextext{\idxcode{subtract_with_carry_engine}!carry}%
|
3044 | 3044 | \indextext{carry!\idxcode{subtract_with_carry_engine}}
|
3045 | 3045 | whose value is either $0$ or $1$.
|
|
4760 | 4760 | \indextext{\idxcode{poisson_distribution}!discrete probability function}%
|
4761 | 4761 | \[ P(i\,|\,\mu) = \frac{e^{-\mu} \mu^{i}}{i\,!} \text{ .} \]
|
4762 | 4762 | The distribution parameter $\mu$
|
4763 |
| -is also known as this distribution's \techterm{mean}% |
| 4763 | +is also known as this distribution's \term{mean}% |
4764 | 4764 | \indextext{mean!\idxcode{poisson_distribution}}%
|
4765 | 4765 | \indextext{\idxcode{poisson_distribution}!mean}%
|
4766 | 4766 | .
|
|
5189 | 5189 | \text{ .}
|
5190 | 5190 | \]
|
5191 | 5191 | The distribution parameters $\mu$ and $\sigma$
|
5192 |
| -are also known as this distribution's \techterm{mean}% |
| 5192 | +are also known as this distribution's \term{mean}% |
5193 | 5193 | \indextext{mean!\idxcode{normal_distribution}}%
|
5194 | 5194 | \indextext{\idxcode{normal_distribution}!mean}
|
5195 |
| -and \techterm{standard deviation}% |
| 5195 | +and \term{standard deviation}% |
5196 | 5196 | \indextext{standard deviation!\idxcode{normal_distribution}}%
|
5197 | 5197 | \indextext{\idxcode{normal_distribution}!standard deviation}%
|
5198 | 5198 | .
|
|
5699 | 5699 | the distribution parameters are calculated as:
|
5700 | 5700 | $p_k = {w_k / S}$ for $k = 0, \dotsc, n - 1$,
|
5701 | 5701 | in which the values $w_k$,
|
5702 |
| -commonly known as the \techterm{weights}% |
| 5702 | +commonly known as the \term{weights}% |
5703 | 5703 | \indextext{\idxcode{discrete_distribution}!weights}%
|
5704 | 5704 | \indextext{weights!\idxcode{discrete_distribution}}%
|
5705 | 5705 | , shall be non-negative, non-NaN, and non-infinity.
|
|
5857 | 5857 |
|
5858 | 5858 | \pnum
|
5859 | 5859 | The $n + 1$ distribution parameters $b_i$,
|
5860 |
| -also known as this distribution's \techterm{interval boundaries}% |
| 5860 | +also known as this distribution's \term{interval boundaries}% |
5861 | 5861 | \indextext{\idxcode{piecewise_constant_distribution}!interval boundaries}%
|
5862 | 5862 | \indextext{interval boundaries!\idxcode{piecewise_constant_distribution}}%
|
5863 | 5863 | , shall satisfy the relation
|
|
5866 | 5866 | the remaining $n$ distribution parameters are calculated as:
|
5867 | 5867 | \[ \rho_k = \frac{w_k}{S \cdot (b_{k+1}-b_k)} \text{ for } k = 0, \dotsc, n - 1 \text{ ,} \]
|
5868 | 5868 | in which the values $w_k$,
|
5869 |
| -commonly known as the \techterm{weights}% |
| 5869 | +commonly known as the \term{weights}% |
5870 | 5870 | \indextext{\idxcode{piecewise_constant_distribution}!weights}%
|
5871 | 5871 | \indextext{weights!\idxcode{piecewise_constant_distribution}}%
|
5872 | 5872 | , shall be non-negative, non-NaN, and non-infinity.
|
|
6072 | 6072 |
|
6073 | 6073 | \pnum
|
6074 | 6074 | The $n + 1$ distribution parameters $b_i$,
|
6075 |
| -also known as this distribution's \techterm{interval boundaries}% |
| 6075 | +also known as this distribution's \term{interval boundaries}% |
6076 | 6076 | \indextext{\idxcode{piecewise_linear_distribution}!interval boundaries}%
|
6077 | 6077 | \indextext{interval boundaries!\idxcode{piecewise_linear_distribution}}%
|
6078 | 6078 | , shall satisfy the relation $b_i < b_{i+1}$ for $i = 0, \dotsc, n - 1$.
|
6079 | 6079 | Unless specified otherwise,
|
6080 | 6080 | the remaining $n + 1$ distribution parameters are calculated as
|
6081 | 6081 | $\rho_k = {w_k / S}$ for $k = 0, \dotsc, n$, in which the values $w_k$,
|
6082 |
| -commonly known as the \techterm{weights at boundaries}% |
| 6082 | +commonly known as the \term{weights at boundaries}% |
6083 | 6083 | \indextext{\idxcode{piecewise_linear_distribution}!weights at boundaries}%
|
6084 | 6084 | \indextext{weights at boundaries!\idxcode{piecewise_linear_distribution}}%
|
6085 | 6085 | , shall be non-negative, non-NaN, and non-infinity.
|
|
0 commit comments