37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 template<
typename _RealType,
size_t __bits,
57 typename _UniformRandomNumberGenerator>
61 _GLIBCXX_END_NAMESPACE_VERSION
68 _GLIBCXX_BEGIN_NAMESPACE_VERSION
70 template<
typename _UIntType,
size_t __w,
71 bool = __w < static_cast<size_t>
74 {
static const _UIntType __value = 0; };
76 template<
typename _UIntType,
size_t __w>
77 struct _Shift<_UIntType, __w, true>
78 {
static const _UIntType __value = _UIntType(1) << __w; };
81 int __which = ((__s <= __CHAR_BIT__ *
sizeof (int))
82 + (__s <= __CHAR_BIT__ *
sizeof (long))
83 + (__s <= __CHAR_BIT__ *
sizeof (
long long))
86 struct _Select_uint_least_t
88 static_assert(__which < 0,
89 "sorry, would be too much trouble for a slow result");
93 struct _Select_uint_least_t<__s, 4>
94 {
typedef unsigned int type; };
97 struct _Select_uint_least_t<__s, 3>
98 {
typedef unsigned long type; };
101 struct _Select_uint_least_t<__s, 2>
102 {
typedef unsigned long long type; };
104 #ifdef _GLIBCXX_USE_INT128 106 struct _Select_uint_least_t<__s, 1>
107 {
typedef unsigned __int128 type; };
111 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c,
112 bool __big_enough = (!(__m & (__m - 1))
113 || (_Tp(-1) - __c) / __a >= __m - 1),
114 bool __schrage_ok = __m % __a < __m / __a>
117 typedef typename _Select_uint_least_t<
std::__lg(__a)
121 {
return static_cast<_Tp
>((_Tp2(__a) * __x + __c) % __m); }
125 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c>
126 struct _Mod<_Tp, __m, __a, __c, false, true>
135 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c,
bool __s>
136 struct _Mod<_Tp, __m, __a, __c, true, __s>
141 _Tp __res = __a * __x + __c;
148 template<
typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
151 {
return _Mod<_Tp, __m, __a, __c>::__calc(__x); }
157 template<
typename _Engine,
typename _DInputType>
161 "template argument must be a floating point type");
164 _Adaptor(_Engine& __g)
169 {
return _DInputType(0); }
173 {
return _DInputType(1); }
192 _GLIBCXX_END_NAMESPACE_VERSION
195 _GLIBCXX_BEGIN_NAMESPACE_VERSION
235 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
238 static_assert(std::is_unsigned<_UIntType>::value,
239 "result_type must be an unsigned integral type");
240 static_assert(__m == 0u || (__a < __m && __c < __m),
241 "template argument substituting __m out of bounds");
248 static constexpr result_type multiplier = __a;
250 static constexpr result_type increment = __c;
253 static constexpr result_type default_seed = 1u;
272 template<
typename _Sseq,
typename =
typename 273 std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value>
286 seed(result_type __s = default_seed);
295 template<
typename _Sseq>
296 typename std::enable_if<std::is_class<_Sseq>::value>::type
305 static constexpr result_type
307 {
return __c == 0u ? 1u : 0u; }
312 static constexpr result_type
322 for (; __z != 0ULL; --__z)
332 _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
350 {
return __lhs._M_x == __rhs._M_x; }
360 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
361 _UIntType1 __m1,
typename _CharT,
typename _Traits>
363 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
365 __a1, __c1, __m1>& __lcr);
380 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
381 _UIntType1 __m1,
typename _CharT,
typename _Traits>
402 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
408 {
return !(__lhs == __rhs); }
439 template<
typename _UIntType,
size_t __w,
440 size_t __n,
size_t __m,
size_t __r,
441 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
442 _UIntType __b,
size_t __t,
443 _UIntType __c,
size_t __l, _UIntType __f>
446 static_assert(std::is_unsigned<_UIntType>::value,
447 "result_type must be an unsigned integral type");
448 static_assert(1u <= __m && __m <= __n,
449 "template argument substituting __m out of bounds");
450 static_assert(__r <= __w,
"template argument substituting " 452 static_assert(__u <= __w,
"template argument substituting " 454 static_assert(__s <= __w,
"template argument substituting " 456 static_assert(__t <= __w,
"template argument substituting " 458 static_assert(__l <= __w,
"template argument substituting " 461 "template argument substituting __w out of bound");
462 static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1),
463 "template argument substituting __a out of bound");
464 static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1),
465 "template argument substituting __b out of bound");
466 static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1),
467 "template argument substituting __c out of bound");
468 static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1),
469 "template argument substituting __d out of bound");
470 static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1),
471 "template argument substituting __f out of bound");
478 static constexpr
size_t word_size = __w;
479 static constexpr
size_t state_size = __n;
480 static constexpr
size_t shift_size = __m;
481 static constexpr
size_t mask_bits = __r;
482 static constexpr result_type xor_mask = __a;
483 static constexpr
size_t tempering_u = __u;
484 static constexpr result_type tempering_d = __d;
485 static constexpr
size_t tempering_s = __s;
486 static constexpr result_type tempering_b = __b;
487 static constexpr
size_t tempering_t = __t;
488 static constexpr result_type tempering_c = __c;
489 static constexpr
size_t tempering_l = __l;
490 static constexpr result_type initialization_multiplier = __f;
491 static constexpr result_type default_seed = 5489u;
504 template<
typename _Sseq,
typename =
typename 505 std::enable_if<!std::is_same<_Sseq, mersenne_twister_engine>::value>
512 seed(result_type __sd = default_seed);
514 template<
typename _Sseq>
515 typename std::enable_if<std::is_class<_Sseq>::value>::type
521 static constexpr result_type
528 static constexpr result_type
530 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
536 discard(
unsigned long long __z);
556 {
return (
std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x)
557 && __lhs._M_p == __rhs._M_p); }
571 template<
typename _UIntType1,
572 size_t __w1,
size_t __n1,
573 size_t __m1,
size_t __r1,
574 _UIntType1 __a1,
size_t __u1,
575 _UIntType1 __d1,
size_t __s1,
576 _UIntType1 __b1,
size_t __t1,
577 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
578 typename _CharT,
typename _Traits>
580 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
582 __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
597 template<
typename _UIntType1,
598 size_t __w1,
size_t __n1,
599 size_t __m1,
size_t __r1,
600 _UIntType1 __a1,
size_t __u1,
601 _UIntType1 __d1,
size_t __s1,
602 _UIntType1 __b1,
size_t __t1,
603 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
604 typename _CharT,
typename _Traits>
608 __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
614 _UIntType _M_x[state_size];
630 template<
typename _UIntType,
size_t __w,
631 size_t __n,
size_t __m,
size_t __r,
632 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
633 _UIntType __b,
size_t __t,
634 _UIntType __c,
size_t __l, _UIntType __f>
637 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
639 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
640 {
return !(__lhs == __rhs); }
658 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
661 static_assert(std::is_unsigned<_UIntType>::value,
662 "result_type must be an unsigned integral type");
663 static_assert(0u < __s && __s < __r,
666 "template argument substituting __w out of bounds");
673 static constexpr
size_t word_size = __w;
674 static constexpr
size_t short_lag = __s;
675 static constexpr
size_t long_lag = __r;
676 static constexpr result_type default_seed = 19780503u;
692 template<
typename _Sseq,
typename =
typename 693 std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value>
712 seed(result_type __sd = default_seed);
718 template<
typename _Sseq>
719 typename std::enable_if<std::is_class<_Sseq>::value>::type
726 static constexpr result_type
734 static constexpr result_type
736 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
744 for (; __z != 0ULL; --__z)
769 {
return (
std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x)
770 && __lhs._M_carry == __rhs._M_carry
771 && __lhs._M_p == __rhs._M_p); }
785 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
786 typename _CharT,
typename _Traits>
788 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
804 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
805 typename _CharT,
typename _Traits>
813 _UIntType _M_x[long_lag];
830 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
836 {
return !(__lhs == __rhs); }
845 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
848 static_assert(1 <= __r && __r <= __p,
849 "template argument substituting __r out of bounds");
853 typedef typename _RandomNumberEngine::result_type
result_type;
856 static constexpr
size_t block_size = __p;
857 static constexpr
size_t used_block = __r;
865 : _M_b(), _M_n(0) { }
875 : _M_b(__rng), _M_n(0) { }
885 : _M_b(
std::move(__rng)), _M_n(0) { }
895 : _M_b(__s), _M_n(0) { }
902 template<
typename _Sseq,
typename =
typename 903 std::enable_if<!std::is_same<_Sseq, discard_block_engine>::value
904 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
938 template<
typename _Sseq>
950 const _RandomNumberEngine&
957 static constexpr result_type
964 static constexpr result_type
974 for (; __z != 0ULL; --__z)
998 {
return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
1011 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
1012 typename _CharT,
typename _Traits>
1014 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1029 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
1030 typename _CharT,
typename _Traits>
1037 _RandomNumberEngine _M_b;
1052 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
1058 {
return !(__lhs == __rhs); }
1065 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1068 static_assert(std::is_unsigned<_UIntType>::value,
1069 "result_type must be an unsigned integral type");
1071 "template argument substituting __w out of bounds");
1103 : _M_b(
std::move(__rng)) { }
1120 template<
typename _Sseq,
typename =
typename 1121 std::enable_if<!std::is_same<_Sseq, independent_bits_engine>::value
1122 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
1150 template<
typename _Sseq>
1159 const _RandomNumberEngine&
1166 static constexpr result_type
1173 static constexpr result_type
1175 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
1183 for (; __z != 0ULL; --__z)
1208 {
return __lhs._M_b == __rhs._M_b; }
1222 template<
typename _CharT,
typename _Traits>
1226 __w, _UIntType>& __x)
1233 _RandomNumberEngine _M_b;
1248 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1254 {
return !(__lhs == __rhs); }
1266 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType,
1267 typename _CharT,
typename _Traits>
1269 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1271 __w, _UIntType>& __x)
1283 template<
typename _RandomNumberEngine,
size_t __k>
1286 static_assert(1u <= __k,
"template argument substituting " 1287 "__k out of bound");
1291 typedef typename _RandomNumberEngine::result_type
result_type;
1293 static constexpr
size_t table_size = __k;
1302 { _M_initialize(); }
1313 { _M_initialize(); }
1323 : _M_b(
std::move(__rng))
1324 { _M_initialize(); }
1335 { _M_initialize(); }
1342 template<
typename _Sseq,
typename =
typename 1343 std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value
1344 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
1349 { _M_initialize(); }
1378 template<
typename _Sseq>
1389 const _RandomNumberEngine&
1396 static constexpr result_type
1403 static constexpr result_type
1413 for (; __z != 0ULL; --__z)
1437 {
return (__lhs._M_b == __rhs._M_b
1438 &&
std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v)
1439 && __lhs._M_y == __rhs._M_y); }
1452 template<
typename _RandomNumberEngine1,
size_t __k1,
1453 typename _CharT,
typename _Traits>
1455 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1470 template<
typename _RandomNumberEngine1,
size_t __k1,
1471 typename _CharT,
typename _Traits>
1477 void _M_initialize()
1479 for (
size_t __i = 0; __i < __k; ++__i)
1484 _RandomNumberEngine _M_b;
1485 result_type _M_v[__k];
1500 template<
typename _RandomNumberEngine,
size_t __k>
1506 {
return !(__lhs == __rhs); }
1543 0xb5026f5aa96619e9ULL, 29,
1544 0x5555555555555555ULL, 17,
1545 0x71d67fffeda60000ULL, 37,
1546 0xfff7eee000000000ULL, 43,
1575 #ifdef _GLIBCXX_USE_RANDOM_TR1 1590 { _M_init_pretr1(__token); }
1596 static constexpr result_type
1600 static constexpr result_type
1605 entropy()
const noexcept
1611 #ifdef _GLIBCXX_USE_RANDOM_TR1 1612 return this->_M_getval();
1614 return this->_M_getval_pretr1();
1628 result_type _M_getval();
1629 result_type _M_getval_pretr1();
1658 template<
typename _IntType>
1662 {
return !(__d1 == __d2); }
1674 template<
typename _IntType,
typename _CharT,
typename _Traits>
1676 operator<<(std::basic_ostream<_CharT, _Traits>&,
1688 template<
typename _IntType,
typename _CharT,
typename _Traits>
1701 template<
typename _RealType =
double>
1705 "result_type must be a floating point type");
1718 _RealType __b = _RealType(1))
1719 : _M_a(__a), _M_b(__b)
1721 __glibcxx_assert(_M_a <= _M_b);
1734 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
1738 {
return !(__p1 == __p2); }
1754 _RealType __b = _RealType(1))
1755 : _M_param(__a, __b)
1773 {
return _M_param.a(); }
1777 {
return _M_param.b(); }
1784 {
return _M_param; }
1792 { _M_param = __param; }
1799 {
return this->a(); }
1806 {
return this->b(); }
1811 template<
typename _UniformRandomNumberGenerator>
1814 {
return this->operator()(__urng, _M_param); }
1816 template<
typename _UniformRandomNumberGenerator>
1818 operator()(_UniformRandomNumberGenerator& __urng,
1821 __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
1823 return (__aurng() * (__p.b() - __p.a())) + __p.a();
1826 template<
typename _ForwardIterator,
1827 typename _UniformRandomNumberGenerator>
1829 __generate(_ForwardIterator __f, _ForwardIterator __t,
1830 _UniformRandomNumberGenerator& __urng)
1831 { this->__generate(__f, __t, __urng, _M_param); }
1833 template<
typename _ForwardIterator,
1834 typename _UniformRandomNumberGenerator>
1836 __generate(_ForwardIterator __f, _ForwardIterator __t,
1837 _UniformRandomNumberGenerator& __urng,
1839 { this->__generate_impl(__f, __t, __urng, __p); }
1841 template<
typename _UniformRandomNumberGenerator>
1843 __generate(result_type* __f, result_type* __t,
1844 _UniformRandomNumberGenerator& __urng,
1846 { this->__generate_impl(__f, __t, __urng, __p); }
1855 {
return __d1._M_param == __d2._M_param; }
1858 template<
typename _ForwardIterator,
1859 typename _UniformRandomNumberGenerator>
1861 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
1862 _UniformRandomNumberGenerator& __urng,
1872 template<
typename _IntType>
1876 {
return !(__d1 == __d2); }
1888 template<
typename _RealType,
typename _CharT,
typename _Traits>
1890 operator<<(std::basic_ostream<_CharT, _Traits>&,
1902 template<
typename _RealType,
typename _CharT,
typename _Traits>
1924 template<
typename _RealType =
double>
1928 "result_type must be a floating point type");
1941 _RealType __stddev = _RealType(1))
1942 : _M_mean(__mean), _M_stddev(__stddev)
1944 __glibcxx_assert(_M_stddev > _RealType(0));
1953 {
return _M_stddev; }
1957 {
return (__p1._M_mean == __p2._M_mean
1958 && __p1._M_stddev == __p2._M_stddev); }
1962 {
return !(__p1 == __p2); }
1966 _RealType _M_stddev;
1976 result_type __stddev = result_type(1))
1977 : _M_param(__mean, __stddev), _M_saved_available(false)
1982 : _M_param(__p), _M_saved_available(
false)
1990 { _M_saved_available =
false; }
1997 {
return _M_param.mean(); }
2004 {
return _M_param.stddev(); }
2011 {
return _M_param; }
2019 { _M_param = __param; }
2038 template<
typename _UniformRandomNumberGenerator>
2041 {
return this->operator()(__urng, _M_param); }
2043 template<
typename _UniformRandomNumberGenerator>
2045 operator()(_UniformRandomNumberGenerator& __urng,
2046 const param_type& __p);
2048 template<
typename _ForwardIterator,
2049 typename _UniformRandomNumberGenerator>
2051 __generate(_ForwardIterator __f, _ForwardIterator __t,
2052 _UniformRandomNumberGenerator& __urng)
2053 { this->__generate(__f, __t, __urng, _M_param); }
2055 template<
typename _ForwardIterator,
2056 typename _UniformRandomNumberGenerator>
2058 __generate(_ForwardIterator __f, _ForwardIterator __t,
2059 _UniformRandomNumberGenerator& __urng,
2060 const param_type& __p)
2061 { this->__generate_impl(__f, __t, __urng, __p); }
2063 template<
typename _UniformRandomNumberGenerator>
2065 __generate(result_type* __f, result_type* __t,
2066 _UniformRandomNumberGenerator& __urng,
2067 const param_type& __p)
2068 { this->__generate_impl(__f, __t, __urng, __p); }
2075 template<
typename _RealType1>
2090 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2092 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2105 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2111 template<
typename _ForwardIterator,
2112 typename _UniformRandomNumberGenerator>
2114 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2115 _UniformRandomNumberGenerator& __urng,
2116 const param_type& __p);
2118 param_type _M_param;
2119 result_type _M_saved;
2120 bool _M_saved_available;
2126 template<
typename _RealType>
2130 {
return !(__d1 == __d2); }
2142 template<
typename _RealType =
double>
2146 "result_type must be a floating point type");
2159 _RealType __s = _RealType(1))
2160 : _M_m(__m), _M_s(__s)
2173 {
return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; }
2177 {
return !(__p1 == __p2); }
2186 _RealType __s = _RealType(1))
2187 : _M_param(__m, __s), _M_nd()
2192 : _M_param(__p), _M_nd()
2207 {
return _M_param.m(); }
2211 {
return _M_param.s(); }
2218 {
return _M_param; }
2226 { _M_param = __param; }
2233 {
return result_type(0); }
2245 template<
typename _UniformRandomNumberGenerator>
2248 {
return this->operator()(__urng, _M_param); }
2250 template<
typename _UniformRandomNumberGenerator>
2252 operator()(_UniformRandomNumberGenerator& __urng,
2254 {
return std::exp(__p.s() * _M_nd(__urng) + __p.m()); }
2256 template<
typename _ForwardIterator,
2257 typename _UniformRandomNumberGenerator>
2259 __generate(_ForwardIterator __f, _ForwardIterator __t,
2260 _UniformRandomNumberGenerator& __urng)
2261 { this->__generate(__f, __t, __urng, _M_param); }
2263 template<
typename _ForwardIterator,
2264 typename _UniformRandomNumberGenerator>
2266 __generate(_ForwardIterator __f, _ForwardIterator __t,
2267 _UniformRandomNumberGenerator& __urng,
2269 { this->__generate_impl(__f, __t, __urng, __p); }
2271 template<
typename _UniformRandomNumberGenerator>
2273 __generate(result_type* __f, result_type* __t,
2274 _UniformRandomNumberGenerator& __urng,
2276 { this->__generate_impl(__f, __t, __urng, __p); }
2286 {
return (__d1._M_param == __d2._M_param
2287 && __d1._M_nd == __d2._M_nd); }
2299 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2301 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2314 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2320 template<
typename _ForwardIterator,
2321 typename _UniformRandomNumberGenerator>
2323 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2324 _UniformRandomNumberGenerator& __urng,
2335 template<
typename _RealType>
2339 {
return !(__d1 == __d2); }
2351 template<
typename _RealType =
double>
2355 "result_type must be a floating point type");
2368 param_type(_RealType __alpha_val = _RealType(1),
2369 _RealType __beta_val = _RealType(1))
2370 : _M_alpha(__alpha_val), _M_beta(__beta_val)
2372 __glibcxx_assert(_M_alpha > _RealType(0));
2378 {
return _M_alpha; }
2385 operator==(
const param_type& __p1,
const param_type& __p2)
2386 {
return (__p1._M_alpha == __p2._M_alpha
2387 && __p1._M_beta == __p2._M_beta); }
2390 operator!=(
const param_type& __p1,
const param_type& __p2)
2391 {
return !(__p1 == __p2); }
2400 _RealType _M_malpha, _M_a2;
2410 _RealType __beta_val = _RealType(1))
2411 : _M_param(__alpha_val, __beta_val), _M_nd()
2416 : _M_param(__p), _M_nd()
2431 {
return _M_param.alpha(); }
2438 {
return _M_param.beta(); }
2445 {
return _M_param; }
2453 { _M_param = __param; }
2460 {
return result_type(0); }
2472 template<
typename _UniformRandomNumberGenerator>
2475 {
return this->operator()(__urng, _M_param); }
2477 template<
typename _UniformRandomNumberGenerator>
2479 operator()(_UniformRandomNumberGenerator& __urng,
2480 const param_type& __p);
2482 template<
typename _ForwardIterator,
2483 typename _UniformRandomNumberGenerator>
2485 __generate(_ForwardIterator __f, _ForwardIterator __t,
2486 _UniformRandomNumberGenerator& __urng)
2487 { this->__generate(__f, __t, __urng, _M_param); }
2489 template<
typename _ForwardIterator,
2490 typename _UniformRandomNumberGenerator>
2492 __generate(_ForwardIterator __f, _ForwardIterator __t,
2493 _UniformRandomNumberGenerator& __urng,
2494 const param_type& __p)
2495 { this->__generate_impl(__f, __t, __urng, __p); }
2497 template<
typename _UniformRandomNumberGenerator>
2499 __generate(result_type* __f, result_type* __t,
2500 _UniformRandomNumberGenerator& __urng,
2501 const param_type& __p)
2502 { this->__generate_impl(__f, __t, __urng, __p); }
2512 {
return (__d1._M_param == __d2._M_param
2513 && __d1._M_nd == __d2._M_nd); }
2525 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2527 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2539 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2545 template<
typename _ForwardIterator,
2546 typename _UniformRandomNumberGenerator>
2548 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2549 _UniformRandomNumberGenerator& __urng,
2550 const param_type& __p);
2552 param_type _M_param;
2560 template<
typename _RealType>
2564 {
return !(__d1 == __d2); }
2573 template<
typename _RealType =
double>
2577 "result_type must be a floating point type");
2599 {
return __p1._M_n == __p2._M_n; }
2603 {
return !(__p1 == __p2); }
2611 : _M_param(__n), _M_gd(__n / 2)
2616 : _M_param(__p), _M_gd(__p.n() / 2)
2631 {
return _M_param.n(); }
2638 {
return _M_param; }
2646 { _M_param = __param; }
2653 {
return result_type(0); }
2665 template<
typename _UniformRandomNumberGenerator>
2668 {
return 2 * _M_gd(__urng); }
2670 template<
typename _UniformRandomNumberGenerator>
2672 operator()(_UniformRandomNumberGenerator& __urng,
2677 return 2 * _M_gd(__urng, param_type(__p.n() / 2));
2680 template<
typename _ForwardIterator,
2681 typename _UniformRandomNumberGenerator>
2683 __generate(_ForwardIterator __f, _ForwardIterator __t,
2684 _UniformRandomNumberGenerator& __urng)
2685 { this->__generate_impl(__f, __t, __urng); }
2687 template<
typename _ForwardIterator,
2688 typename _UniformRandomNumberGenerator>
2690 __generate(_ForwardIterator __f, _ForwardIterator __t,
2691 _UniformRandomNumberGenerator& __urng,
2695 this->__generate_impl(__f, __t, __urng, __p2); }
2697 template<
typename _UniformRandomNumberGenerator>
2699 __generate(result_type* __f, result_type* __t,
2700 _UniformRandomNumberGenerator& __urng)
2701 { this->__generate_impl(__f, __t, __urng); }
2703 template<
typename _UniformRandomNumberGenerator>
2705 __generate(result_type* __f, result_type* __t,
2706 _UniformRandomNumberGenerator& __urng,
2710 this->__generate_impl(__f, __t, __urng, __p2); }
2720 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
2732 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2734 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2747 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2753 template<
typename _ForwardIterator,
2754 typename _UniformRandomNumberGenerator>
2756 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2757 _UniformRandomNumberGenerator& __urng);
2759 template<
typename _ForwardIterator,
2760 typename _UniformRandomNumberGenerator>
2762 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2763 _UniformRandomNumberGenerator& __urng,
2775 template<
typename _RealType>
2779 {
return !(__d1 == __d2); }
2788 template<
typename _RealType =
double>
2792 "result_type must be a floating point type");
2805 _RealType __b = _RealType(1))
2806 : _M_a(__a), _M_b(__b)
2819 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
2823 {
return !(__p1 == __p2); }
2832 _RealType __b = _RealType(1))
2833 : _M_param(__a, __b)
2853 {
return _M_param.a(); }
2857 {
return _M_param.b(); }
2864 {
return _M_param; }
2872 { _M_param = __param; }
2891 template<
typename _UniformRandomNumberGenerator>
2894 {
return this->operator()(__urng, _M_param); }
2896 template<
typename _UniformRandomNumberGenerator>
2898 operator()(_UniformRandomNumberGenerator& __urng,
2901 template<
typename _ForwardIterator,
2902 typename _UniformRandomNumberGenerator>
2904 __generate(_ForwardIterator __f, _ForwardIterator __t,
2905 _UniformRandomNumberGenerator& __urng)
2906 { this->__generate(__f, __t, __urng, _M_param); }
2908 template<
typename _ForwardIterator,
2909 typename _UniformRandomNumberGenerator>
2911 __generate(_ForwardIterator __f, _ForwardIterator __t,
2912 _UniformRandomNumberGenerator& __urng,
2914 { this->__generate_impl(__f, __t, __urng, __p); }
2916 template<
typename _UniformRandomNumberGenerator>
2918 __generate(result_type* __f, result_type* __t,
2919 _UniformRandomNumberGenerator& __urng,
2921 { this->__generate_impl(__f, __t, __urng, __p); }
2930 {
return __d1._M_param == __d2._M_param; }
2933 template<
typename _ForwardIterator,
2934 typename _UniformRandomNumberGenerator>
2936 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2937 _UniformRandomNumberGenerator& __urng,
2947 template<
typename _RealType>
2951 {
return !(__d1 == __d2); }
2963 template<
typename _RealType,
typename _CharT,
typename _Traits>
2965 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2978 template<
typename _RealType,
typename _CharT,
typename _Traits>
2994 template<
typename _RealType =
double>
2998 "result_type must be a floating point type");
3011 _RealType __n = _RealType(1))
3012 : _M_m(__m), _M_n(__n)
3025 {
return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; }
3029 {
return !(__p1 == __p2); }
3038 _RealType __n = _RealType(1))
3039 : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2)
3044 : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2)
3062 {
return _M_param.m(); }
3066 {
return _M_param.n(); }
3073 {
return _M_param; }
3081 { _M_param = __param; }
3088 {
return result_type(0); }
3100 template<
typename _UniformRandomNumberGenerator>
3103 {
return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); }
3105 template<
typename _UniformRandomNumberGenerator>
3107 operator()(_UniformRandomNumberGenerator& __urng,
3112 return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n())
3113 / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m()));
3116 template<
typename _ForwardIterator,
3117 typename _UniformRandomNumberGenerator>
3119 __generate(_ForwardIterator __f, _ForwardIterator __t,
3120 _UniformRandomNumberGenerator& __urng)
3121 { this->__generate_impl(__f, __t, __urng); }
3123 template<
typename _ForwardIterator,
3124 typename _UniformRandomNumberGenerator>
3126 __generate(_ForwardIterator __f, _ForwardIterator __t,
3127 _UniformRandomNumberGenerator& __urng,
3129 { this->__generate_impl(__f, __t, __urng, __p); }
3131 template<
typename _UniformRandomNumberGenerator>
3133 __generate(result_type* __f, result_type* __t,
3134 _UniformRandomNumberGenerator& __urng)
3135 { this->__generate_impl(__f, __t, __urng); }
3137 template<
typename _UniformRandomNumberGenerator>
3139 __generate(result_type* __f, result_type* __t,
3140 _UniformRandomNumberGenerator& __urng,
3142 { this->__generate_impl(__f, __t, __urng, __p); }
3152 {
return (__d1._M_param == __d2._M_param
3153 && __d1._M_gd_x == __d2._M_gd_x
3154 && __d1._M_gd_y == __d2._M_gd_y); }
3166 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3168 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3181 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3187 template<
typename _ForwardIterator,
3188 typename _UniformRandomNumberGenerator>
3190 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3191 _UniformRandomNumberGenerator& __urng);
3193 template<
typename _ForwardIterator,
3194 typename _UniformRandomNumberGenerator>
3196 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3197 _UniformRandomNumberGenerator& __urng,
3208 template<
typename _RealType>
3212 {
return !(__d1 == __d2); }
3223 template<
typename _RealType =
double>
3227 "result_type must be a floating point type");
3249 {
return __p1._M_n == __p2._M_n; }
3253 {
return !(__p1 == __p2); }
3261 : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2)
3266 : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2)
3284 {
return _M_param.n(); }
3291 {
return _M_param; }
3299 { _M_param = __param; }
3318 template<
typename _UniformRandomNumberGenerator>
3321 {
return _M_nd(__urng) *
std::sqrt(n() / _M_gd(__urng)); }
3323 template<
typename _UniformRandomNumberGenerator>
3325 operator()(_UniformRandomNumberGenerator& __urng,
3331 const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2));
3332 return _M_nd(__urng) *
std::sqrt(__p.n() / __g);
3335 template<
typename _ForwardIterator,
3336 typename _UniformRandomNumberGenerator>
3338 __generate(_ForwardIterator __f, _ForwardIterator __t,
3339 _UniformRandomNumberGenerator& __urng)
3340 { this->__generate_impl(__f, __t, __urng); }
3342 template<
typename _ForwardIterator,
3343 typename _UniformRandomNumberGenerator>
3345 __generate(_ForwardIterator __f, _ForwardIterator __t,
3346 _UniformRandomNumberGenerator& __urng,
3348 { this->__generate_impl(__f, __t, __urng, __p); }
3350 template<
typename _UniformRandomNumberGenerator>
3352 __generate(result_type* __f, result_type* __t,
3353 _UniformRandomNumberGenerator& __urng)
3354 { this->__generate_impl(__f, __t, __urng); }
3356 template<
typename _UniformRandomNumberGenerator>
3358 __generate(result_type* __f, result_type* __t,
3359 _UniformRandomNumberGenerator& __urng,
3361 { this->__generate_impl(__f, __t, __urng, __p); }
3371 {
return (__d1._M_param == __d2._M_param
3372 && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
3384 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3386 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3399 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3405 template<
typename _ForwardIterator,
3406 typename _UniformRandomNumberGenerator>
3408 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3409 _UniformRandomNumberGenerator& __urng);
3410 template<
typename _ForwardIterator,
3411 typename _UniformRandomNumberGenerator>
3413 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3414 _UniformRandomNumberGenerator& __urng,
3426 template<
typename _RealType>
3430 {
return !(__d1 == __d2); }
3462 __glibcxx_assert((_M_p >= 0.0) && (_M_p <= 1.0));
3471 {
return __p1._M_p == __p2._M_p; }
3475 {
return !(__p1 == __p2); }
3511 {
return _M_param.p(); }
3518 {
return _M_param; }
3526 { _M_param = __param; }
3545 template<
typename _UniformRandomNumberGenerator>
3548 {
return this->operator()(__urng, _M_param); }
3550 template<
typename _UniformRandomNumberGenerator>
3552 operator()(_UniformRandomNumberGenerator& __urng,
3555 __detail::_Adaptor<_UniformRandomNumberGenerator, double>
3557 if ((__aurng() - __aurng.min())
3558 < __p.p() * (__aurng.max() - __aurng.min()))
3563 template<
typename _ForwardIterator,
3564 typename _UniformRandomNumberGenerator>
3566 __generate(_ForwardIterator __f, _ForwardIterator __t,
3567 _UniformRandomNumberGenerator& __urng)
3568 { this->__generate(__f, __t, __urng, _M_param); }
3570 template<
typename _ForwardIterator,
3571 typename _UniformRandomNumberGenerator>
3573 __generate(_ForwardIterator __f, _ForwardIterator __t,
3574 _UniformRandomNumberGenerator& __urng,
const param_type& __p)
3575 { this->__generate_impl(__f, __t, __urng, __p); }
3577 template<
typename _UniformRandomNumberGenerator>
3579 __generate(result_type* __f, result_type* __t,
3580 _UniformRandomNumberGenerator& __urng,
3582 { this->__generate_impl(__f, __t, __urng, __p); }
3591 {
return __d1._M_param == __d2._M_param; }
3594 template<
typename _ForwardIterator,
3595 typename _UniformRandomNumberGenerator>
3597 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3598 _UniformRandomNumberGenerator& __urng,
3611 {
return !(__d1 == __d2); }
3623 template<
typename _CharT,
typename _Traits>
3625 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3637 template<
typename _CharT,
typename _Traits>
3656 template<
typename _IntType =
int>
3660 "result_type must be an integral type");
3673 param_type(_IntType __t = _IntType(1),
double __p = 0.5)
3674 : _M_t(__t), _M_p(__p)
3676 __glibcxx_assert((_M_t >= _IntType(0))
3691 operator==(
const param_type& __p1,
const param_type& __p2)
3692 {
return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; }
3695 operator!=(
const param_type& __p1,
const param_type& __p2)
3696 {
return !(__p1 == __p2); }
3706 #if _GLIBCXX_USE_C99_MATH_TR1 3707 double _M_d1, _M_d2, _M_s1, _M_s2, _M_c,
3708 _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p;
3717 : _M_param(__t, __p), _M_nd()
3722 : _M_param(__p), _M_nd()
3737 {
return _M_param.t(); }
3744 {
return _M_param.p(); }
3751 {
return _M_param; }
3759 { _M_param = __param; }
3773 {
return _M_param.t(); }
3778 template<
typename _UniformRandomNumberGenerator>
3781 {
return this->operator()(__urng, _M_param); }
3783 template<
typename _UniformRandomNumberGenerator>
3785 operator()(_UniformRandomNumberGenerator& __urng,
3788 template<
typename _ForwardIterator,
3789 typename _UniformRandomNumberGenerator>
3791 __generate(_ForwardIterator __f, _ForwardIterator __t,
3792 _UniformRandomNumberGenerator& __urng)
3793 { this->__generate(__f, __t, __urng, _M_param); }
3795 template<
typename _ForwardIterator,
3796 typename _UniformRandomNumberGenerator>
3798 __generate(_ForwardIterator __f, _ForwardIterator __t,
3799 _UniformRandomNumberGenerator& __urng,
3801 { this->__generate_impl(__f, __t, __urng, __p); }
3803 template<
typename _UniformRandomNumberGenerator>
3806 _UniformRandomNumberGenerator& __urng,
3808 { this->__generate_impl(__f, __t, __urng, __p); }
3818 #ifdef _GLIBCXX_USE_C99_MATH_TR1 3819 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
3821 {
return __d1._M_param == __d2._M_param; }
3834 template<
typename _IntType1,
3835 typename _CharT,
typename _Traits>
3837 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3850 template<
typename _IntType1,
3851 typename _CharT,
typename _Traits>
3857 template<
typename _ForwardIterator,
3858 typename _UniformRandomNumberGenerator>
3860 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3861 _UniformRandomNumberGenerator& __urng,
3864 template<
typename _UniformRandomNumberGenerator>
3866 _M_waiting(_UniformRandomNumberGenerator& __urng,
3867 _IntType __t,
double __q);
3878 template<
typename _IntType>
3882 {
return !(__d1 == __d2); }
3892 template<
typename _IntType =
int>
3896 "result_type must be an integral type");
3912 __glibcxx_assert((_M_p > 0.0) && (_M_p < 1.0));
3921 operator==(
const param_type& __p1,
const param_type& __p2)
3922 {
return __p1._M_p == __p2._M_p; }
3925 operator!=(
const param_type& __p1,
const param_type& __p2)
3926 {
return !(__p1 == __p2); }
3931 { _M_log_1_p =
std::log(1.0 - _M_p); }
3962 {
return _M_param.p(); }
3969 {
return _M_param; }
3977 { _M_param = __param; }
3996 template<
typename _UniformRandomNumberGenerator>
3999 {
return this->operator()(__urng, _M_param); }
4001 template<
typename _UniformRandomNumberGenerator>
4003 operator()(_UniformRandomNumberGenerator& __urng,
4006 template<
typename _ForwardIterator,
4007 typename _UniformRandomNumberGenerator>
4009 __generate(_ForwardIterator __f, _ForwardIterator __t,
4010 _UniformRandomNumberGenerator& __urng)
4011 { this->__generate(__f, __t, __urng, _M_param); }
4013 template<
typename _ForwardIterator,
4014 typename _UniformRandomNumberGenerator>
4016 __generate(_ForwardIterator __f, _ForwardIterator __t,
4017 _UniformRandomNumberGenerator& __urng,
4019 { this->__generate_impl(__f, __t, __urng, __p); }
4021 template<
typename _UniformRandomNumberGenerator>
4024 _UniformRandomNumberGenerator& __urng,
4026 { this->__generate_impl(__f, __t, __urng, __p); }
4035 {
return __d1._M_param == __d2._M_param; }
4038 template<
typename _ForwardIterator,
4039 typename _UniformRandomNumberGenerator>
4041 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4042 _UniformRandomNumberGenerator& __urng,
4052 template<
typename _IntType>
4056 {
return !(__d1 == __d2); }
4068 template<
typename _IntType,
4069 typename _CharT,
typename _Traits>
4071 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4083 template<
typename _IntType,
4084 typename _CharT,
typename _Traits>
4097 template<
typename _IntType =
int>
4101 "result_type must be an integral type");
4113 param_type(_IntType __k = 1,
double __p = 0.5)
4114 : _M_k(__k), _M_p(__p)
4116 __glibcxx_assert((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0));
4129 {
return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; }
4133 {
return !(__p1 == __p2); }
4142 : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p)
4147 : _M_param(__p), _M_gd(__p.k(), (1.0 - __p.p()) / __p.p())
4162 {
return _M_param.k(); }
4169 {
return _M_param.p(); }
4176 {
return _M_param; }
4184 { _M_param = __param; }
4203 template<
typename _UniformRandomNumberGenerator>
4205 operator()(_UniformRandomNumberGenerator& __urng);
4207 template<
typename _UniformRandomNumberGenerator>
4209 operator()(_UniformRandomNumberGenerator& __urng,
4212 template<
typename _ForwardIterator,
4213 typename _UniformRandomNumberGenerator>
4215 __generate(_ForwardIterator __f, _ForwardIterator __t,
4216 _UniformRandomNumberGenerator& __urng)
4217 { this->__generate_impl(__f, __t, __urng); }
4219 template<
typename _ForwardIterator,
4220 typename _UniformRandomNumberGenerator>
4222 __generate(_ForwardIterator __f, _ForwardIterator __t,
4223 _UniformRandomNumberGenerator& __urng,
4225 { this->__generate_impl(__f, __t, __urng, __p); }
4227 template<
typename _UniformRandomNumberGenerator>
4230 _UniformRandomNumberGenerator& __urng)
4231 { this->__generate_impl(__f, __t, __urng); }
4233 template<
typename _UniformRandomNumberGenerator>
4236 _UniformRandomNumberGenerator& __urng,
4238 { this->__generate_impl(__f, __t, __urng, __p); }
4248 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
4261 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4263 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4276 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4282 template<
typename _ForwardIterator,
4283 typename _UniformRandomNumberGenerator>
4285 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4286 _UniformRandomNumberGenerator& __urng);
4287 template<
typename _ForwardIterator,
4288 typename _UniformRandomNumberGenerator>
4290 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4291 _UniformRandomNumberGenerator& __urng,
4302 template<
typename _IntType>
4306 {
return !(__d1 == __d2); }
4324 template<
typename _IntType =
int>
4328 "result_type must be an integral type");
4344 __glibcxx_assert(_M_mean > 0.0);
4353 operator==(
const param_type& __p1,
const param_type& __p2)
4354 {
return __p1._M_mean == __p2._M_mean; }
4357 operator!=(
const param_type& __p1,
const param_type& __p2)
4358 {
return !(__p1 == __p2); }
4368 #if _GLIBCXX_USE_C99_MATH_TR1 4369 double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb;
4376 : _M_param(__mean), _M_nd()
4381 : _M_param(__p), _M_nd()
4396 {
return _M_param.mean(); }
4403 {
return _M_param; }
4411 { _M_param = __param; }
4430 template<
typename _UniformRandomNumberGenerator>
4433 {
return this->operator()(__urng, _M_param); }
4435 template<
typename _UniformRandomNumberGenerator>
4437 operator()(_UniformRandomNumberGenerator& __urng,
4440 template<
typename _ForwardIterator,
4441 typename _UniformRandomNumberGenerator>
4443 __generate(_ForwardIterator __f, _ForwardIterator __t,
4444 _UniformRandomNumberGenerator& __urng)
4445 { this->__generate(__f, __t, __urng, _M_param); }
4447 template<
typename _ForwardIterator,
4448 typename _UniformRandomNumberGenerator>
4450 __generate(_ForwardIterator __f, _ForwardIterator __t,
4451 _UniformRandomNumberGenerator& __urng,
4453 { this->__generate_impl(__f, __t, __urng, __p); }
4455 template<
typename _UniformRandomNumberGenerator>
4458 _UniformRandomNumberGenerator& __urng,
4460 { this->__generate_impl(__f, __t, __urng, __p); }
4470 #ifdef _GLIBCXX_USE_C99_MATH_TR1 4471 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
4473 {
return __d1._M_param == __d2._M_param; }
4486 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4488 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4501 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4507 template<
typename _ForwardIterator,
4508 typename _UniformRandomNumberGenerator>
4510 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4511 _UniformRandomNumberGenerator& __urng,
4523 template<
typename _IntType>
4527 {
return !(__d1 == __d2); }
4545 template<
typename _RealType =
double>
4549 "result_type must be a floating point type");
4561 param_type(_RealType __lambda = _RealType(1))
4562 : _M_lambda(__lambda)
4564 __glibcxx_assert(_M_lambda > _RealType(0));
4569 {
return _M_lambda; }
4573 {
return __p1._M_lambda == __p2._M_lambda; }
4577 {
return !(__p1 == __p2); }
4580 _RealType _M_lambda;
4590 : _M_param(__lambda)
4611 {
return _M_param.lambda(); }
4618 {
return _M_param; }
4626 { _M_param = __param; }
4645 template<
typename _UniformRandomNumberGenerator>
4648 {
return this->operator()(__urng, _M_param); }
4650 template<
typename _UniformRandomNumberGenerator>
4652 operator()(_UniformRandomNumberGenerator& __urng,
4655 __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
4660 template<
typename _ForwardIterator,
4661 typename _UniformRandomNumberGenerator>
4663 __generate(_ForwardIterator __f, _ForwardIterator __t,
4664 _UniformRandomNumberGenerator& __urng)
4665 { this->__generate(__f, __t, __urng, _M_param); }
4667 template<
typename _ForwardIterator,
4668 typename _UniformRandomNumberGenerator>
4670 __generate(_ForwardIterator __f, _ForwardIterator __t,
4671 _UniformRandomNumberGenerator& __urng,
4673 { this->__generate_impl(__f, __t, __urng, __p); }
4675 template<
typename _UniformRandomNumberGenerator>
4678 _UniformRandomNumberGenerator& __urng,
4680 { this->__generate_impl(__f, __t, __urng, __p); }
4689 {
return __d1._M_param == __d2._M_param; }
4692 template<
typename _ForwardIterator,
4693 typename _UniformRandomNumberGenerator>
4695 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4696 _UniformRandomNumberGenerator& __urng,
4706 template<
typename _RealType>
4710 {
return !(__d1 == __d2); }
4722 template<
typename _RealType,
typename _CharT,
typename _Traits>
4724 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4737 template<
typename _RealType,
typename _CharT,
typename _Traits>
4752 template<
typename _RealType =
double>
4756 "result_type must be a floating point type");
4769 _RealType __b = _RealType(1))
4770 : _M_a(__a), _M_b(__b)
4783 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
4787 {
return !(__p1 == __p2); }
4796 _RealType __b = _RealType(1))
4797 : _M_param(__a, __b)
4817 {
return _M_param.a(); }
4824 {
return _M_param.b(); }
4831 {
return _M_param; }
4839 { _M_param = __param; }
4858 template<
typename _UniformRandomNumberGenerator>
4861 {
return this->operator()(__urng, _M_param); }
4863 template<
typename _UniformRandomNumberGenerator>
4865 operator()(_UniformRandomNumberGenerator& __urng,
4868 template<
typename _ForwardIterator,
4869 typename _UniformRandomNumberGenerator>
4871 __generate(_ForwardIterator __f, _ForwardIterator __t,
4872 _UniformRandomNumberGenerator& __urng)
4873 { this->__generate(__f, __t, __urng, _M_param); }
4875 template<
typename _ForwardIterator,
4876 typename _UniformRandomNumberGenerator>
4878 __generate(_ForwardIterator __f, _ForwardIterator __t,
4879 _UniformRandomNumberGenerator& __urng,
4881 { this->__generate_impl(__f, __t, __urng, __p); }
4883 template<
typename _UniformRandomNumberGenerator>
4886 _UniformRandomNumberGenerator& __urng,
4888 { this->__generate_impl(__f, __t, __urng, __p); }
4897 {
return __d1._M_param == __d2._M_param; }
4900 template<
typename _ForwardIterator,
4901 typename _UniformRandomNumberGenerator>
4903 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4904 _UniformRandomNumberGenerator& __urng,
4914 template<
typename _RealType>
4918 {
return !(__d1 == __d2); }
4930 template<
typename _RealType,
typename _CharT,
typename _Traits>
4932 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4945 template<
typename _RealType,
typename _CharT,
typename _Traits>
4960 template<
typename _RealType =
double>
4964 "result_type must be a floating point type");
4977 _RealType __b = _RealType(1))
4978 : _M_a(__a), _M_b(__b)
4991 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
4995 {
return !(__p1 == __p2); }
5004 _RealType __b = _RealType(1))
5005 : _M_param(__a, __b)
5025 {
return _M_param.a(); }
5032 {
return _M_param.b(); }
5039 {
return _M_param; }
5047 { _M_param = __param; }
5066 template<
typename _UniformRandomNumberGenerator>
5069 {
return this->operator()(__urng, _M_param); }
5071 template<
typename _UniformRandomNumberGenerator>
5073 operator()(_UniformRandomNumberGenerator& __urng,
5076 template<
typename _ForwardIterator,
5077 typename _UniformRandomNumberGenerator>
5079 __generate(_ForwardIterator __f, _ForwardIterator __t,
5080 _UniformRandomNumberGenerator& __urng)
5081 { this->__generate(__f, __t, __urng, _M_param); }
5083 template<
typename _ForwardIterator,
5084 typename _UniformRandomNumberGenerator>
5086 __generate(_ForwardIterator __f, _ForwardIterator __t,
5087 _UniformRandomNumberGenerator& __urng,
5089 { this->__generate_impl(__f, __t, __urng, __p); }
5091 template<
typename _UniformRandomNumberGenerator>
5094 _UniformRandomNumberGenerator& __urng,
5096 { this->__generate_impl(__f, __t, __urng, __p); }
5105 {
return __d1._M_param == __d2._M_param; }
5108 template<
typename _ForwardIterator,
5109 typename _UniformRandomNumberGenerator>
5111 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5112 _UniformRandomNumberGenerator& __urng,
5122 template<
typename _RealType>
5126 {
return !(__d1 == __d2); }
5138 template<
typename _RealType,
typename _CharT,
typename _Traits>
5140 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5153 template<
typename _RealType,
typename _CharT,
typename _Traits>
5165 template<
typename _IntType =
int>
5169 "result_type must be an integral type");
5182 : _M_prob(), _M_cp()
5185 template<
typename _InputIterator>
5186 param_type(_InputIterator __wbegin,
5187 _InputIterator __wend)
5188 : _M_prob(__wbegin, __wend), _M_cp()
5189 { _M_initialize(); }
5192 : _M_prob(__wil.begin(), __wil.end()), _M_cp()
5193 { _M_initialize(); }
5195 template<
typename _Func>
5196 param_type(
size_t __nw,
double __xmin,
double __xmax,
5200 param_type(
const param_type&) =
default;
5201 param_type& operator=(
const param_type&) =
default;
5204 probabilities()
const 5208 operator==(
const param_type& __p1,
const param_type& __p2)
5209 {
return __p1._M_prob == __p2._M_prob; }
5212 operator!=(
const param_type& __p1,
const param_type& __p2)
5213 {
return !(__p1 == __p2); }
5227 template<
typename _InputIterator>
5229 _InputIterator __wend)
5230 : _M_param(__wbegin, __wend)
5237 template<
typename _Func>
5240 : _M_param(__nw, __xmin, __xmax, __fw)
5261 return _M_param._M_prob.empty()
5270 {
return _M_param; }
5278 { _M_param = __param; }
5293 return _M_param._M_prob.empty()
5300 template<
typename _UniformRandomNumberGenerator>
5303 {
return this->operator()(__urng, _M_param); }
5305 template<
typename _UniformRandomNumberGenerator>
5307 operator()(_UniformRandomNumberGenerator& __urng,
5310 template<
typename _ForwardIterator,
5311 typename _UniformRandomNumberGenerator>
5313 __generate(_ForwardIterator __f, _ForwardIterator __t,
5314 _UniformRandomNumberGenerator& __urng)
5315 { this->__generate(__f, __t, __urng, _M_param); }
5317 template<
typename _ForwardIterator,
5318 typename _UniformRandomNumberGenerator>
5320 __generate(_ForwardIterator __f, _ForwardIterator __t,
5321 _UniformRandomNumberGenerator& __urng,
5323 { this->__generate_impl(__f, __t, __urng, __p); }
5325 template<
typename _UniformRandomNumberGenerator>
5328 _UniformRandomNumberGenerator& __urng,
5330 { this->__generate_impl(__f, __t, __urng, __p); }
5339 {
return __d1._M_param == __d2._M_param; }
5351 template<
typename _IntType1,
typename _CharT,
typename _Traits>
5353 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5367 template<
typename _IntType1,
typename _CharT,
typename _Traits>
5373 template<
typename _ForwardIterator,
5374 typename _UniformRandomNumberGenerator>
5376 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5377 _UniformRandomNumberGenerator& __urng,
5387 template<
typename _IntType>
5391 {
return !(__d1 == __d2); }
5400 template<
typename _RealType =
double>
5404 "result_type must be a floating point type");
5417 : _M_int(), _M_den(), _M_cp()
5420 template<
typename _InputIteratorB,
typename _InputIteratorW>
5421 param_type(_InputIteratorB __bfirst,
5422 _InputIteratorB __bend,
5423 _InputIteratorW __wbegin);
5425 template<
typename _Func>
5428 template<
typename _Func>
5429 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
5433 param_type(
const param_type&) =
default;
5434 param_type& operator=(
const param_type&) =
default;
5442 __tmp[1] = _RealType(1);
5454 operator==(
const param_type& __p1,
const param_type& __p2)
5455 {
return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
5458 operator!=(
const param_type& __p1,
const param_type& __p2)
5459 {
return !(__p1 == __p2); }
5475 template<
typename _InputIteratorB,
typename _InputIteratorW>
5477 _InputIteratorB __bend,
5478 _InputIteratorW __wbegin)
5479 : _M_param(__bfirst, __bend, __wbegin)
5482 template<
typename _Func>
5485 : _M_param(__bl, __fw)
5488 template<
typename _Func>
5490 _RealType __xmin, _RealType __xmax,
5492 : _M_param(__nw, __xmin, __xmax, __fw)
5513 if (_M_param._M_int.empty())
5516 __tmp[1] = _RealType(1);
5520 return _M_param._M_int;
5529 return _M_param._M_den.empty()
5538 {
return _M_param; }
5546 { _M_param = __param; }
5554 return _M_param._M_int.empty()
5564 return _M_param._M_int.empty()
5571 template<
typename _UniformRandomNumberGenerator>
5574 {
return this->operator()(__urng, _M_param); }
5576 template<
typename _UniformRandomNumberGenerator>
5578 operator()(_UniformRandomNumberGenerator& __urng,
5581 template<
typename _ForwardIterator,
5582 typename _UniformRandomNumberGenerator>
5584 __generate(_ForwardIterator __f, _ForwardIterator __t,
5585 _UniformRandomNumberGenerator& __urng)
5586 { this->__generate(__f, __t, __urng, _M_param); }
5588 template<
typename _ForwardIterator,
5589 typename _UniformRandomNumberGenerator>
5591 __generate(_ForwardIterator __f, _ForwardIterator __t,
5592 _UniformRandomNumberGenerator& __urng,
5594 { this->__generate_impl(__f, __t, __urng, __p); }
5596 template<
typename _UniformRandomNumberGenerator>
5599 _UniformRandomNumberGenerator& __urng,
5601 { this->__generate_impl(__f, __t, __urng, __p); }
5610 {
return __d1._M_param == __d2._M_param; }
5623 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5625 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5639 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5645 template<
typename _ForwardIterator,
5646 typename _UniformRandomNumberGenerator>
5648 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5649 _UniformRandomNumberGenerator& __urng,
5659 template<
typename _RealType>
5663 {
return !(__d1 == __d2); }
5672 template<
typename _RealType =
double>
5676 "result_type must be a floating point type");
5689 : _M_int(), _M_den(), _M_cp(), _M_m()
5692 template<
typename _InputIteratorB,
typename _InputIteratorW>
5693 param_type(_InputIteratorB __bfirst,
5694 _InputIteratorB __bend,
5695 _InputIteratorW __wbegin);
5697 template<
typename _Func>
5700 template<
typename _Func>
5701 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
5705 param_type(
const param_type&) =
default;
5706 param_type& operator=(
const param_type&) =
default;
5714 __tmp[1] = _RealType(1);
5726 operator==(
const param_type& __p1,
const param_type& __p2)
5727 {
return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
5730 operator!=(
const param_type& __p1,
const param_type& __p2)
5731 {
return !(__p1 == __p2); }
5748 template<
typename _InputIteratorB,
typename _InputIteratorW>
5750 _InputIteratorB __bend,
5751 _InputIteratorW __wbegin)
5752 : _M_param(__bfirst, __bend, __wbegin)
5755 template<
typename _Func>
5758 : _M_param(__bl, __fw)
5761 template<
typename _Func>
5763 _RealType __xmin, _RealType __xmax,
5765 : _M_param(__nw, __xmin, __xmax, __fw)
5786 if (_M_param._M_int.
empty())
5789 __tmp[1] = _RealType(1);
5793 return _M_param._M_int;
5803 return _M_param._M_den.
empty()
5812 {
return _M_param; }
5820 { _M_param = __param; }
5828 return _M_param._M_int.
empty()
5838 return _M_param._M_int.
empty()
5845 template<
typename _UniformRandomNumberGenerator>
5848 {
return this->operator()(__urng, _M_param); }
5850 template<
typename _UniformRandomNumberGenerator>
5852 operator()(_UniformRandomNumberGenerator& __urng,
5855 template<
typename _ForwardIterator,
5856 typename _UniformRandomNumberGenerator>
5858 __generate(_ForwardIterator __f, _ForwardIterator __t,
5859 _UniformRandomNumberGenerator& __urng)
5860 { this->__generate(__f, __t, __urng, _M_param); }
5862 template<
typename _ForwardIterator,
5863 typename _UniformRandomNumberGenerator>
5865 __generate(_ForwardIterator __f, _ForwardIterator __t,
5866 _UniformRandomNumberGenerator& __urng,
5868 { this->__generate_impl(__f, __t, __urng, __p); }
5870 template<
typename _UniformRandomNumberGenerator>
5873 _UniformRandomNumberGenerator& __urng,
5875 { this->__generate_impl(__f, __t, __urng, __p); }
5884 {
return __d1._M_param == __d2._M_param; }
5897 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5899 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5913 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5919 template<
typename _ForwardIterator,
5920 typename _UniformRandomNumberGenerator>
5922 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5923 _UniformRandomNumberGenerator& __urng,
5933 template<
typename _RealType>
5937 {
return !(__d1 == __d2); }
5965 template<
typename _IntType>
5968 template<
typename _InputIterator>
5969 seed_seq(_InputIterator __begin, _InputIterator __end);
5972 template<
typename _RandomAccessIterator>
5974 generate(_RandomAccessIterator __begin, _RandomAccessIterator __end);
5977 size_t size()
const noexcept
5978 {
return _M_v.size(); }
5980 template<
typename OutputIterator>
5982 param(OutputIterator __dest)
const 5983 { std::copy(_M_v.begin(), _M_v.end(), __dest); }
5997 _GLIBCXX_END_NAMESPACE_VERSION
A piecewise_constant_distribution random number distribution.
shuffle_order_engine(result_type __s)
Seed constructs a shuffle_order_engine engine.
friend bool operator==(const mersenne_twister_engine &__lhs, const mersenne_twister_engine &__rhs)
Compares two % mersenne_twister_engine random number generator objects of the same type for equality...
result_type min() const
Returns the greatest lower bound value of the distribution.
discard_block_engine(_Sseq &__q)
Generator construct a discard_block_engine engine.
_RealType generate_canonical(_UniformRandomNumberGenerator &__g)
A function template for converting the output of a (integral) uniform random number generator to a fl...
param_type param() const
Returns the parameter set of the distribution.
result_type operator()()
Gets the next random number in the sequence.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
static constexpr result_type max()
Gets the maximum value in the generated random number range.
param_type param() const
Returns the parameter set of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
shuffle_order_engine(_RandomNumberEngine &&__rng)
Move constructs a shuffle_order_engine engine.
static constexpr _Tp max() noexcept
param_type param() const
Returns the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
const _RandomNumberEngine & base() const noexcept
Gets a const reference to the underlying generator engine object.
void seed(_Sseq &__q)
Reseeds the shuffle_order_engine object with the given seed sequence.
A lognormal_distribution random number distribution.
friend bool operator==(const uniform_real_distribution &__d1, const uniform_real_distribution &__d2)
Return true if two uniform real distributions have the same parameters.
The seed_seq class generates sequences of seeds for random number generators.
result_type max() const
Returns the least upper bound value of the distribution.
subtract_with_carry_engine(result_type __sd=default_seed)
Constructs an explicitly seeded % subtract_with_carry_engine random number generator.
A piecewise_linear_distribution random number distribution.
void reset()
Resets the distribution state.
A model of a linear congruential random number generator.
A cauchy_distribution random number distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
An exponential continuous distribution for random numbers.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void reset()
Resets the distribution state.
static constexpr _Tp lowest() noexcept
double mean() const
Returns the distribution parameter mean.
param_type param() const
Returns the parameter set of the distribution.
_IntType t() const
Returns the distribution t parameter.
friend bool operator==(const discrete_distribution &__d1, const discrete_distribution &__d2)
Return true if two discrete distributions have the same parameters.
shuffle_order_engine(const _RandomNumberEngine &__rng)
Copy constructs a shuffle_order_engine engine.
std::vector< _RealType > intervals() const
Return the intervals of the distribution.
double p() const
Returns the distribution parameter p.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
const _RandomNumberEngine & base() const noexcept
A discrete_distribution random number distribution.
std::vector< double > probabilities() const
Returns the probabilities of the distribution.
param_type param() const
Returns the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
A weibull_distribution random number distribution.
static constexpr result_type max()
Gets the inclusive maximum value of the range of random integers returned by this generator...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type min() const
Returns the inclusive lower bound of the distribution range.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
_RealType alpha() const
Returns the of the distribution.
double p() const
Returns the distribution p parameter.
linear_congruential_engine(_Sseq &__q)
Constructs a linear_congruential_engine random number generator engine seeded from the seed sequence ...
static constexpr result_type min()
Gets the minimum value in the generated random number range.
param_type param() const
Returns the parameter set of the distribution.
void reset()
Resets the distribution state.
void param(const param_type &__param)
Sets the parameter set of the distribution.
Template class basic_ostream.
_RandomNumberEngine::result_type result_type
static constexpr result_type min()
A chi_squared_distribution random number distribution.
friend bool operator==(const chi_squared_distribution &__d1, const chi_squared_distribution &__d2)
Return true if two Chi-squared distributions have the same parameters and the sequences that would be...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
_RealType mean() const
Returns the mean of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
void reset()
Resets the distribution state.
shuffle_order_engine(_Sseq &__q)
Generator construct a shuffle_order_engine engine.
result_type min() const
Returns the greatest lower bound value of the distribution.
void seed(result_type __s)
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
void discard(unsigned long long __z)
Discard a sequence of random numbers.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type max() const
Returns the least upper bound value of the distribution.
A negative_binomial_distribution random number distribution.
_RealType lambda() const
Returns the inverse scale parameter of the distribution.
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
friend bool operator==(const discard_block_engine &__lhs, const discard_block_engine &__rhs)
Compares two discard_block_engine random number generator objects of the same type for equality...
void param(const param_type &__param)
Sets the parameter set of the distribution.
constexpr int __lg(int __n)
This is a helper function for the sort routines and for random.tcc.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
result_type min() const
Returns the greatest lower bound value of the distribution.
A discrete geometric random number distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
result_type max() const
Returns the least upper bound value of the distribution.
void reset()
Resets the distribution state.
void reset()
Resets the distribution state.
Uniform continuous distribution for random numbers.
uint_least32_t result_type
mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL > mt19937
void param(const param_type &__param)
Sets the parameter set of the distribution.
friend bool operator==(const geometric_distribution &__d1, const geometric_distribution &__d2)
Return true if two geometric distributions have the same parameters.
Uniform discrete distribution for random numbers. A discrete random distribution on the range with e...
void reset()
Resets the distribution state.
static constexpr result_type max()
Gets the largest possible value in the output range.
static constexpr result_type max()
Gets the largest possible value in the output range.
param_type param() const
Returns the parameter set of the distribution.
friend bool operator==(const linear_congruential_engine &__lhs, const linear_congruential_engine &__rhs)
Compares two linear congruential random number generator objects of the same type for equality...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
param_type param() const
Returns the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
double p() const
Return the parameter of the distribution.
_RealType b() const
Return the parameter of the distribution.
void seed(result_type __s)
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
Produces random numbers by combining random numbers from some base engine to produce random numbers w...
void param(const param_type &__param)
Sets the parameter set of the distribution.
friend bool operator==(const exponential_distribution &__d1, const exponential_distribution &__d2)
Return true if two exponential distributions have the same parameters.
normal_distribution(result_type __mean=result_type(0), result_type __stddev=result_type(1))
independent_bits_engine(result_type __s)
Seed constructs a independent_bits_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type min() const
Returns the greatest lower bound value of the distribution.
ISO C++ entities toplevel namespace is std.
Template class basic_istream.
void seed()
Reseeds the discard_block_engine object with the default seed for the underlying base class generator...
result_type max() const
Returns the least upper bound value of the distribution.
result_type min() const
Returns the greatest lower bound value of the distribution.
friend bool operator==(const gamma_distribution &__d1, const gamma_distribution &__d2)
Return true if two gamma distributions have the same parameters and the sequences that would be gener...
result_type min() const
Returns the greatest lower bound value of the distribution.
discard_block_engine(const _RandomNumberEngine &__rng)
Copy constructs a discard_block_engine engine.
result_type max() const
Returns the least upper bound value of the distribution.
subtract_with_carry_engine(_Sseq &__q)
Constructs a subtract_with_carry_engine random number engine seeded from the seed sequence __q...
result_type min() const
Returns the greatest lower bound value of the distribution.
_RealType a() const
Return the parameter of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
friend bool operator==(const fisher_f_distribution &__d1, const fisher_f_distribution &__d2)
Return true if two Fisher f distributions have the same parameters and the sequences that would be ge...
param_type param() const
Returns the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
param_type param() const
Returns the parameter set of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
Tests a range for element-wise equality.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend bool operator==(const binomial_distribution &__d1, const binomial_distribution &__d2)
Return true if two binomial distributions have the same parameters and the sequences that would be ge...
std::vector< double > densities() const
Returns a vector of the probability densities.
std::vector< double > densities() const
Return a vector of the probability densities of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
gamma_distribution(_RealType __alpha_val=_RealType(1), _RealType __beta_val=_RealType(1))
Constructs a gamma distribution with parameters and .
void discard(unsigned long long __z)
void param(const param_type &__param)
Sets the parameter set of the distribution.
static constexpr result_type min()
Gets the minimum value in the generated random number range.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type min() const
Returns the greatest lower bound value of the distribution.
_RealType a() const
Return the parameter of the distribution.
friend bool operator==(const subtract_with_carry_engine &__lhs, const subtract_with_carry_engine &__rhs)
Compares two % subtract_with_carry_engine random number generator objects of the same type for equali...
void seed(result_type __s)
Reseeds the discard_block_engine object with the default seed for the underlying base class generator...
void seed()
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
A extreme_value_distribution random number distribution.
independent_bits_engine()
Constructs a default independent_bits_engine engine.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
reference back() noexcept
friend bool operator==(const piecewise_constant_distribution &__d1, const piecewise_constant_distribution &__d2)
Return true if two piecewise constant distributions have the same parameters.
One of the math functors.
result_type max() const
Returns the least upper bound value of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
A Bernoulli random number distribution.
The Marsaglia-Zaman generator.
A discrete Poisson random number distribution.
void reset()
Resets the distribution state.
param_type param() const
Returns the parameter set of the distribution.
mersenne_twister_engine< uint_fast64_t, 64, 312, 156, 31, 0xb5026f5aa96619e9ULL, 29, 0x5555555555555555ULL, 17, 0x71d67fffeda60000ULL, 37, 0xfff7eee000000000ULL, 43, 6364136223846793005ULL > mt19937_64
friend bool operator==(const shuffle_order_engine &__lhs, const shuffle_order_engine &__rhs)
exponential_distribution(const result_type &__lambda=result_type(1))
Constructs an exponential distribution with inverse scale parameter .
result_type max() const
Returns the least upper bound value of the distribution.
std::vector< _RealType > intervals() const
Returns a vector of the intervals.
mersenne_twister_engine(_Sseq &__q)
Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence __q...
static constexpr result_type min()
Gets the smallest possible value in the output range.
void param(const param_type &__param)
Sets the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type min() const
Returns the greatest lower bound value of the distribution.
linear_congruential_engine< uint_fast32_t, 48271UL, 0UL, 2147483647UL > minstd_rand
A student_t_distribution random number distribution.
friend bool operator==(const piecewise_linear_distribution &__d1, const piecewise_linear_distribution &__d2)
Return true if two piecewise linear distributions have the same parameters.
void seed()
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
_RandomNumberEngine::result_type result_type
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type max() const
Returns the least upper bound value of the distribution.
friend bool operator==(const extreme_value_distribution &__d1, const extreme_value_distribution &__d2)
Return true if two extreme value distributions have the same parameters.
independent_bits_engine(_Sseq &__q)
Generator construct a independent_bits_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
double p() const
Returns the p parameter of the distribution.
bool empty() const noexcept
A discrete binomial random number distribution.
shuffle_order_engine()
Constructs a default shuffle_order_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
static constexpr result_type max()
void reset()
Resets the distribution state.
A gamma continuous distribution for random numbers.
result_type max() const
Returns the least upper bound value of the distribution.
bernoulli_distribution(double __p=0.5)
Constructs a Bernoulli distribution with likelihood p.
discard_block_engine(result_type __s)
Seed constructs a discard_block_engine engine.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > &__x)
Extracts the current state of a % subtract_with_carry_engine random number generator engine __x from ...
result_type min() const
Returns the greatest lower bound value of the distribution.
friend bool operator==(const student_t_distribution &__d1, const student_t_distribution &__d2)
Return true if two Student t distributions have the same parameters and the sequences that would be g...
linear_congruential_engine< uint_fast32_t, 16807UL, 0UL, 2147483647UL > minstd_rand0
void reset()
Resets the distribution state.
result_type max() const
Returns the inclusive upper bound of the distribution range.
void param(const param_type &__param)
Sets the parameter set of the distribution.
static constexpr result_type min()
Gets the inclusive minimum value of the range of random integers returned by this generator...
_RealType stddev() const
Returns the standard deviation of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
void reset()
Resets the distribution state.
friend bool operator==(const independent_bits_engine &__lhs, const independent_bits_engine &__rhs)
Compares two independent_bits_engine random number generator objects of the same type for equality...
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
friend bool operator==(const negative_binomial_distribution &__d1, const negative_binomial_distribution &__d2)
Return true if two negative binomial distributions have the same parameters and the sequences that wo...
discard_block_engine(_RandomNumberEngine &&__rng)
Move constructs a discard_block_engine engine.
void reset()
Resets the distribution state.
independent_bits_engine(const _RandomNumberEngine &__rng)
Copy constructs a independent_bits_engine engine.
A fisher_f_distribution random number distribution.
uniform_real_distribution(_RealType __a=_RealType(0), _RealType __b=_RealType(1))
Constructs a uniform_real_distribution object.
void param(const param_type &__param)
Sets the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
const _RandomNumberEngine & base() const noexcept
Gets a const reference to the underlying generator engine object.
static constexpr result_type min()
Gets the smallest possible value in the output range.
friend bool operator==(const weibull_distribution &__d1, const weibull_distribution &__d2)
Return true if two Weibull distributions have the same parameters.
discard_block_engine()
Constructs a default discard_block_engine engine.
A normal continuous distribution for random numbers.
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
param_type param() const
Returns the parameter set of the distribution.
void reset()
Resets the distribution state.
result_type min() const
Returns the greatest lower bound value of the distribution.
void seed(_Sseq &__q)
Reseeds the discard_block_engine object with the given seed sequence.
void reset()
Resets the distribution state.
param_type param() const
Returns the parameter set of the distribution.
reference front() noexcept
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend bool operator==(const lognormal_distribution &__d1, const lognormal_distribution &__d2)
Return true if two lognormal distributions have the same parameters and the sequences that would be g...
void reset()
Resets the distribution state.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void seed(_Sseq &__q)
Reseeds the independent_bits_engine object with the given seed sequence.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
linear_congruential_engine(result_type __s=default_seed)
Constructs a linear_congruential_engine random number generator engine with seed __s. The default seed value is 1.
Properties of fundamental types.
static constexpr result_type max()
Gets the maximum value in the generated random number range.
static constexpr _Tp min() noexcept
result_type min() const
Returns the greatest lower bound value of the distribution.
friend bool operator==(const cauchy_distribution &__d1, const cauchy_distribution &__d2)
Return true if two Cauchy distributions have the same parameters.
friend bool operator==(const poisson_distribution &__d1, const poisson_distribution &__d2)
Return true if two Poisson distributions have the same parameters and the sequences that would be gen...
void reset()
Resets the distribution state.
_IntType k() const
Return the parameter of the distribution.
void reset()
Resets the distribution state.
independent_bits_engine(_RandomNumberEngine &&__rng)
Move constructs a independent_bits_engine engine.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
_RealType beta() const
Returns the of the distribution.
param_type param() const
Returns the parameter set of the distribution.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, const _Quoted_string< basic_string< _CharT, _Traits, _Alloc > &, _CharT > &__str)
Extractor for delimited strings. The left and right delimiters can be different.
result_type min() const
Returns the greatest lower bound value of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
friend bool operator==(const bernoulli_distribution &__d1, const bernoulli_distribution &__d2)
Return true if two Bernoulli distributions have the same parameters.
bool operator!=(const std::piecewise_linear_distribution< _RealType > &__d1, const std::piecewise_linear_distribution< _RealType > &__d2)
Return true if two piecewise linear distributions have different parameters.
_RealType b() const
Return the parameter of the distribution.