|
1869 | 1869 | is often determined statistically.
|
1870 | 1870 | \end{note}
|
1871 | 1871 |
|
1872 |
| -\pnum |
1873 |
| -A class \tcode{G} |
1874 |
| -satisfies the requirements |
1875 |
| -of a \term{uniform random bit generator} |
1876 |
| -if the expressions shown |
1877 |
| -in \tref{UniformRandomBitGenerator} |
1878 |
| -are valid and have the indicated semantics, |
1879 |
| -and if \tcode{G} also satisfies all other requirements |
1880 |
| -of this subclause \ref{rand.req.urng}. |
1881 |
| -In that Table and throughout this subclause: |
1882 |
| -\begin{enumeratea} |
1883 |
| - \item |
1884 |
| - \tcode{T} is the type named by |
1885 |
| - \tcode{G}'s associated \tcode{result_type}, |
1886 |
| - and |
1887 |
| - \item |
1888 |
| - \tcode{g} is a value of \tcode{G}. |
1889 |
| -\end{enumeratea} |
1890 |
| - |
1891 |
| -\begin{libreqtab4d} |
1892 |
| - {Uniform random bit generator requirements} |
1893 |
| - {tab:UniformRandomBitGenerator} |
1894 |
| -\\ \topline |
1895 |
| -\lhdr{Expression} |
1896 |
| - & \chdr{Return type} |
1897 |
| - & \chdr{Pre/post-condition} |
1898 |
| - & \rhdr{Complexity} |
1899 |
| - \\ \capsep |
1900 |
| -\endfirsthead |
1901 |
| -\hline |
1902 |
| -\lhdr{Expression} |
1903 |
| - & \chdr{Return type} |
1904 |
| - & \chdr{Pre/post-condition} |
1905 |
| - & \rhdr{Complexity} |
1906 |
| - \\ \capsep |
1907 |
| -\endhead |
1908 |
| -\indextext{\idxcode{result_type}!uniform random bit generator requirement}% |
1909 |
| -\tcode{G::result_type} |
1910 |
| - & \tcode{T} |
1911 |
| - & \tcode{T} is an unsigned integer type\iref{basic.fundamental}. |
1912 |
| - & compile-time |
1913 |
| - \\ \rowsep |
1914 |
| -\tcode{g()}% |
1915 |
| -\indextext{\idxcode{operator()}!uniform random bit generator requirement} |
1916 |
| - & \tcode{T} |
1917 |
| - & Returns a value in the closed interval |
1918 |
| - $[$\tcode{G::min()}, \tcode{G::max()}$]$. |
1919 |
| - & amortized constant |
1920 |
| - \\ \rowsep |
1921 |
| -\tcode{G::min()}% |
1922 |
| -\indextext{\idxcode{min}!uniform random bit generator requirement} |
1923 |
| - & \tcode{T} |
1924 |
| - & Denotes the least value potentially returned |
1925 |
| - by \tcode{operator()}. |
1926 |
| - & compile-time |
1927 |
| - \\ \rowsep |
1928 |
| -\tcode{G::max()} |
1929 |
| -\indextext{\idxcode{max}!uniform random bit generator requirement} |
1930 |
| - & \tcode{T} |
1931 |
| - & Denotes the greatest value potentially returned |
1932 |
| - by \tcode{operator()}. |
1933 |
| - & compile-time |
1934 |
| - \\ |
1935 |
| -\end{libreqtab4d} |
1936 |
| - |
1937 |
| -\pnum |
1938 |
| -The following relation shall hold: |
1939 |
| -\tcode{G::min() < G::max()}. |
1940 |
| -\indextext{requirements!uniform random bit generator|)}% |
1941 |
| -\indextext{uniform random bit generator!requirements|)} |
1942 |
| - |
1943 |
| -\pnum |
1944 |
| -The \libconcept{UniformRandomBitGenerator} concept is a slight relaxation of the |
1945 |
| -uniform random bit generator requirements, in that it does not require a nested |
1946 |
| -\grammarterm{typedef-name} \tcode{result_type}. |
1947 |
| - |
1948 | 1872 | \begin{codeblock}
|
1949 | 1873 | template <class G>
|
1950 | 1874 | concept UniformRandomBitGenerator =
|
|
1956 | 1880 | \end{codeblock}
|
1957 | 1881 |
|
1958 | 1882 | \pnum
|
1959 |
| -Let \tcode{g} be an object of type \tcode{G}. |
1960 |
| -\tcode{UniformRandomBitGenerator<G>} is satisfied only if |
| 1883 | +Let \tcode{g} be an object of type \tcode{G}. \tcode{G} models |
| 1884 | +\libconcept{UniformRandomBitGenerator} only if |
1961 | 1885 |
|
1962 | 1886 | \begin{itemize}
|
1963 | 1887 | \item Both \tcode{G::min()} and \tcode{G::max()} are constant
|
|
1968 | 1892 | \item \tcode{g()} has amortized constant complexity.
|
1969 | 1893 | \end{itemize}
|
1970 | 1894 |
|
| 1895 | +\indextext{requirements!uniform random bit generator|)}% |
| 1896 | +\indextext{uniform random bit generator!requirements|)}% |
| 1897 | +\pnum |
| 1898 | +A class \tcode{G} meets the \term{uniform random bit generator} requirements if |
| 1899 | +\tcode{G} models \libconcept{UniformRandomBitGenerator}, |
| 1900 | +\tcode{invoke_result_t<G\&>} is an unsigned integer type\iref{basic.fundamental}, |
| 1901 | +and |
| 1902 | +\tcode{G} provides a nested \grammarterm{typedef-name} \tcode{result_type} |
| 1903 | +that denotes the same type as \tcode{invoke_result_t<G\&>}. |
| 1904 | + |
| 1905 | + |
1971 | 1906 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
1972 | 1907 | % Random Number Engine requirements:
|
1973 | 1908 |
|
|
2142 | 2077 | \state{e}{i+1} $= \mathsf{TA}($\state{e}{i}$)$
|
2143 | 2078 | and returns
|
2144 | 2079 | $\mathsf{GA}($\state{e}{i}$)$.
|
2145 |
| - & per \tref{UniformRandomBitGenerator} |
| 2080 | + & per \ref{rand.req.urng} |
2146 | 2081 | \\ \rowsep
|
2147 | 2082 | \tcode{e.discard(z)}%
|
2148 | 2083 | \indextext{\idxcode{discard}!random number engine requirement}
|
|
0 commit comments