37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 template<
typename _RealType,
size_t __bits,
57 typename _UniformRandomNumberGenerator>
66 template<
typename _UIntType,
size_t __w,
67 bool = __w < static_cast<size_t>
70 {
static const _UIntType __value = 0; };
72 template<
typename _UIntType,
size_t __w>
73 struct _Shift<_UIntType, __w, true>
74 {
static const _UIntType __value = _UIntType(1) << __w; };
77 int __which = ((__s <= __CHAR_BIT__ *
sizeof (int))
78 + (__s <= __CHAR_BIT__ *
sizeof (long))
79 + (__s <= __CHAR_BIT__ *
sizeof (
long long))
82 struct _Select_uint_least_t
84 static_assert(__which < 0,
85 "sorry, would be too much trouble for a slow result");
89 struct _Select_uint_least_t<__s, 4>
90 {
typedef unsigned int type; };
93 struct _Select_uint_least_t<__s, 3>
94 {
typedef unsigned long type; };
97 struct _Select_uint_least_t<__s, 2>
98 {
typedef unsigned long long type; };
100 #ifdef _GLIBCXX_USE_INT128 102 struct _Select_uint_least_t<__s, 1>
103 {
typedef unsigned __int128 type; };
107 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c,
108 bool __big_enough = (!(__m & (__m - 1))
109 || (_Tp(-1) - __c) / __a >= __m - 1),
110 bool __schrage_ok = __m % __a < __m / __a>
113 typedef typename _Select_uint_least_t<
std::__lg(__a)
117 {
return static_cast<_Tp>((_Tp2(__a) * __x + __c) % __m); }
121 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c>
122 struct _Mod<_Tp, __m, __a, __c, false, true>
131 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c,
bool __s>
132 struct _Mod<_Tp, __m, __a, __c, true, __s>
137 _Tp __res = __a * __x + __c;
144 template<
typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
147 {
return _Mod<_Tp, __m, __a, __c>::__calc(__x); }
153 template<
typename _Engine,
typename _DInputType>
157 "template argument must be a floating point type");
160 _Adaptor(_Engine& __g)
165 {
return _DInputType(0); }
169 {
return _DInputType(1); }
228 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
231 static_assert(std::is_unsigned<_UIntType>::value,
232 "result_type must be an unsigned integral type");
233 static_assert(__m == 0u || (__a < __m && __c < __m),
234 "template argument substituting __m out of bounds");
265 template<
typename _Sseq,
typename =
typename 288 template<
typename _Sseq>
300 {
return __c == 0u ? 1u : 0u; }
315 for (; __z != 0ULL; --__z)
325 _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
343 {
return __lhs._M_x == __rhs._M_x; }
353 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
354 _UIntType1 __m1,
typename _CharT,
typename _Traits>
358 __a1, __c1, __m1>& __lcr);
373 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
374 _UIntType1 __m1,
typename _CharT,
typename _Traits>
395 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
401 {
return !(__lhs == __rhs); }
432 template<
typename _UIntType,
size_t __w,
433 size_t __n,
size_t __m,
size_t __r,
434 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
435 _UIntType __b,
size_t __t,
436 _UIntType __c,
size_t __l, _UIntType __f>
439 static_assert(std::is_unsigned<_UIntType>::value,
440 "result_type must be an unsigned integral type");
441 static_assert(1u <= __m && __m <= __n,
442 "template argument substituting __m out of bounds");
443 static_assert(__r <= __w,
"template argument substituting " 445 static_assert(__u <= __w,
"template argument substituting " 447 static_assert(__s <= __w,
"template argument substituting " 449 static_assert(__t <= __w,
"template argument substituting " 451 static_assert(__l <= __w,
"template argument substituting " 454 "template argument substituting __w out of bound");
455 static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1),
456 "template argument substituting __a out of bound");
457 static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1),
458 "template argument substituting __b out of bound");
459 static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1),
460 "template argument substituting __c out of bound");
461 static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1),
462 "template argument substituting __d out of bound");
463 static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1),
464 "template argument substituting __f out of bound");
471 static constexpr
size_t word_size = __w;
472 static constexpr
size_t state_size = __n;
473 static constexpr
size_t shift_size = __m;
474 static constexpr
size_t mask_bits = __r;
476 static constexpr
size_t tempering_u = __u;
478 static constexpr
size_t tempering_s = __s;
480 static constexpr
size_t tempering_t = __t;
482 static constexpr
size_t tempering_l = __l;
483 static constexpr
result_type initialization_multiplier = __f;
497 template<
typename _Sseq,
typename =
typename 507 template<
typename _Sseq>
523 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
529 discard(
unsigned long long __z);
549 {
return (
std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x)
550 && __lhs._M_p == __rhs._M_p); }
564 template<
typename _UIntType1,
565 size_t __w1,
size_t __n1,
566 size_t __m1,
size_t __r1,
567 _UIntType1 __a1,
size_t __u1,
568 _UIntType1 __d1,
size_t __s1,
569 _UIntType1 __b1,
size_t __t1,
570 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
571 typename _CharT,
typename _Traits>
575 __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
590 template<
typename _UIntType1,
591 size_t __w1,
size_t __n1,
592 size_t __m1,
size_t __r1,
593 _UIntType1 __a1,
size_t __u1,
594 _UIntType1 __d1,
size_t __s1,
595 _UIntType1 __b1,
size_t __t1,
596 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
597 typename _CharT,
typename _Traits>
601 __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
607 _UIntType _M_x[state_size];
623 template<
typename _UIntType,
size_t __w,
624 size_t __n,
size_t __m,
size_t __r,
625 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
626 _UIntType __b,
size_t __t,
627 _UIntType __c,
size_t __l, _UIntType __f>
630 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
632 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
633 {
return !(__lhs == __rhs); }
651 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
654 static_assert(std::is_unsigned<_UIntType>::value,
655 "result_type must be an unsigned integral type");
656 static_assert(0u < __s && __s < __r,
659 "template argument substituting __w out of bounds");
666 static constexpr
size_t word_size = __w;
667 static constexpr
size_t short_lag = __s;
668 static constexpr
size_t long_lag = __r;
669 static constexpr
result_type default_seed = 19780503u;
685 template<
typename _Sseq,
typename =
typename 711 template<
typename _Sseq>
729 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
737 for (; __z != 0ULL; --__z)
762 {
return (
std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x)
763 && __lhs._M_carry == __rhs._M_carry
764 && __lhs._M_p == __rhs._M_p); }
778 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
779 typename _CharT,
typename _Traits>
797 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
798 typename _CharT,
typename _Traits>
806 _UIntType _M_x[long_lag];
823 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
829 {
return !(__lhs == __rhs); }
838 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
841 static_assert(1 <= __r && __r <= __p,
842 "template argument substituting __r out of bounds");
846 typedef typename _RandomNumberEngine::result_type
result_type;
849 static constexpr
size_t block_size = __p;
850 static constexpr
size_t used_block = __r;
858 : _M_b(), _M_n(0) { }
868 : _M_b(__rng), _M_n(0) { }
878 : _M_b(
std::move(__rng)), _M_n(0) { }
888 : _M_b(__s), _M_n(0) { }
895 template<
typename _Sseq,
typename =
typename 931 template<
typename _Sseq>
943 const _RandomNumberEngine&
967 for (; __z != 0ULL; --__z)
991 {
return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
1004 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
1005 typename _CharT,
typename _Traits>
1022 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
1023 typename _CharT,
typename _Traits>
1030 _RandomNumberEngine _M_b;
1045 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
1051 {
return !(__lhs == __rhs); }
1058 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1061 static_assert(std::is_unsigned<_UIntType>::value,
1062 "result_type must be an unsigned integral type");
1064 "template argument substituting __w out of bounds");
1096 : _M_b(
std::move(__rng)) { }
1113 template<
typename _Sseq,
typename =
typename 1143 template<
typename _Sseq>
1152 const _RandomNumberEngine&
1168 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
1176 for (; __z != 0ULL; --__z)
1201 {
return __lhs._M_b == __rhs._M_b; }
1215 template<
typename _CharT,
typename _Traits>
1219 __w, _UIntType>& __x)
1226 _RandomNumberEngine _M_b;
1241 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1247 {
return !(__lhs == __rhs); }
1259 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType,
1260 typename _CharT,
typename _Traits>
1264 __w, _UIntType>& __x)
1276 template<
typename _RandomNumberEngine,
size_t __k>
1279 static_assert(1u <= __k,
"template argument substituting " 1280 "__k out of bound");
1284 typedef typename _RandomNumberEngine::result_type
result_type;
1286 static constexpr
size_t table_size = __k;
1295 { _M_initialize(); }
1306 { _M_initialize(); }
1316 : _M_b(
std::move(__rng))
1317 { _M_initialize(); }
1328 { _M_initialize(); }
1335 template<
typename _Sseq,
typename =
typename 1342 { _M_initialize(); }
1371 template<
typename _Sseq>
1382 const _RandomNumberEngine&
1406 for (; __z != 0ULL; --__z)
1430 {
return (__lhs._M_b == __rhs._M_b
1431 &&
std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v)
1432 && __lhs._M_y == __rhs._M_y); }
1445 template<
typename _RandomNumberEngine1,
size_t __k1,
1446 typename _CharT,
typename _Traits>
1463 template<
typename _RandomNumberEngine1,
size_t __k1,
1464 typename _CharT,
typename _Traits>
1470 void _M_initialize()
1472 for (
size_t __i = 0; __i < __k; ++__i)
1477 _RandomNumberEngine _M_b;
1493 template<
typename _RandomNumberEngine,
size_t __k>
1499 {
return !(__lhs == __rhs); }
1505 typedef linear_congruential_engine<uint_fast32_t, 16807UL, 0UL, 2147483647UL>
1536 0xb5026f5aa96619e9ULL, 29,
1537 0x5555555555555555ULL, 17,
1538 0x71d67fffeda60000ULL, 37,
1539 0xfff7eee000000000ULL, 43,
1568 #ifdef _GLIBCXX_USE_RANDOM_TR1 1582 random_device(
const std::string& __token =
"mt19937")
1583 { _M_init_pretr1(__token); }
1598 entropy() const noexcept
1600 #ifdef _GLIBCXX_USE_RANDOM_TR1 1601 return this->_M_getentropy();
1610 #ifdef _GLIBCXX_USE_RANDOM_TR1 1611 return this->_M_getval();
1613 return this->_M_getval_pretr1();
1618 random_device(
const random_device&) =
delete;
1619 void operator=(
const random_device&) =
delete;
1629 double _M_getentropy() const noexcept;
1658 template<
typename _IntType>
1662 {
return !(__d1 == __d2); }
1674 template<
typename _IntType,
typename _CharT,
typename _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,
1819 const param_type& __p)
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,
1838 const param_type& __p)
1839 { this->__generate_impl(__f, __t, __urng, __p); }
1841 template<
typename _UniformRandomNumberGenerator>
1844 _UniformRandomNumberGenerator& __urng,
1845 const param_type& __p)
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,
1863 const param_type& __p);
1865 param_type _M_param;
1872 template<
typename _IntType>
1876 {
return !(__d1 == __d2); }
1888 template<
typename _RealType,
typename _CharT,
typename _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;
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>
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>
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;
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; }
2245 template<
typename _UniformRandomNumberGenerator>
2248 {
return this->
operator()(__urng, _M_param); }
2250 template<
typename _UniformRandomNumberGenerator>
2252 operator()(_UniformRandomNumberGenerator& __urng,
2253 const param_type& __p)
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,
2268 const param_type& __p)
2269 { this->__generate_impl(__f, __t, __urng, __p); }
2271 template<
typename _UniformRandomNumberGenerator>
2274 _UniformRandomNumberGenerator& __urng,
2275 const param_type& __p)
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>
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,
2325 const param_type& __p);
2327 param_type _M_param;
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; }
2386 {
return (__p1._M_alpha == __p2._M_alpha
2387 && __p1._M_beta == __p2._M_beta); }
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; }
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>
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>
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; }
2670 template<
typename _UniformRandomNumberGenerator>
2673 {
return 2 * _M_gd(__urng); }
2675 template<
typename _UniformRandomNumberGenerator>
2677 operator()(_UniformRandomNumberGenerator& __urng,
2678 const param_type& __p)
2682 return 2 * _M_gd(__urng, param_type(__p.n() / 2));
2685 template<
typename _ForwardIterator,
2686 typename _UniformRandomNumberGenerator>
2688 __generate(_ForwardIterator __f, _ForwardIterator __t,
2689 _UniformRandomNumberGenerator& __urng)
2690 { this->__generate_impl(__f, __t, __urng); }
2692 template<
typename _ForwardIterator,
2693 typename _UniformRandomNumberGenerator>
2695 __generate(_ForwardIterator __f, _ForwardIterator __t,
2696 _UniformRandomNumberGenerator& __urng,
2697 const param_type& __p)
2700 this->__generate_impl(__f, __t, __urng, __p2); }
2702 template<
typename _UniformRandomNumberGenerator>
2705 _UniformRandomNumberGenerator& __urng)
2706 { this->__generate_impl(__f, __t, __urng); }
2708 template<
typename _UniformRandomNumberGenerator>
2711 _UniformRandomNumberGenerator& __urng,
2712 const param_type& __p)
2715 this->__generate_impl(__f, __t, __urng, __p2); }
2725 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
2737 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2752 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2758 template<
typename _ForwardIterator,
2759 typename _UniformRandomNumberGenerator>
2761 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2762 _UniformRandomNumberGenerator& __urng);
2764 template<
typename _ForwardIterator,
2765 typename _UniformRandomNumberGenerator>
2767 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2768 _UniformRandomNumberGenerator& __urng,
2772 param_type _M_param;
2780 template<
typename _RealType>
2784 {
return !(__d1 == __d2); }
2793 template<
typename _RealType =
double>
2797 "result_type must be a floating point type");
2810 _RealType __b = _RealType(1))
2811 : _M_a(__a), _M_b(__b)
2824 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
2828 {
return !(__p1 == __p2); }
2837 _RealType __b = _RealType(1))
2838 : _M_param(__a, __b)
2858 {
return _M_param.a(); }
2862 {
return _M_param.b(); }
2869 {
return _M_param; }
2877 { _M_param = __param; }
2896 template<
typename _UniformRandomNumberGenerator>
2899 {
return this->
operator()(__urng, _M_param); }
2901 template<
typename _UniformRandomNumberGenerator>
2903 operator()(_UniformRandomNumberGenerator& __urng,
2904 const param_type& __p);
2906 template<
typename _ForwardIterator,
2907 typename _UniformRandomNumberGenerator>
2909 __generate(_ForwardIterator __f, _ForwardIterator __t,
2910 _UniformRandomNumberGenerator& __urng)
2911 { this->__generate(__f, __t, __urng, _M_param); }
2913 template<
typename _ForwardIterator,
2914 typename _UniformRandomNumberGenerator>
2916 __generate(_ForwardIterator __f, _ForwardIterator __t,
2917 _UniformRandomNumberGenerator& __urng,
2918 const param_type& __p)
2919 { this->__generate_impl(__f, __t, __urng, __p); }
2921 template<
typename _UniformRandomNumberGenerator>
2924 _UniformRandomNumberGenerator& __urng,
2925 const param_type& __p)
2926 { this->__generate_impl(__f, __t, __urng, __p); }
2935 {
return __d1._M_param == __d2._M_param; }
2938 template<
typename _ForwardIterator,
2939 typename _UniformRandomNumberGenerator>
2941 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
2942 _UniformRandomNumberGenerator& __urng,
2943 const param_type& __p);
2945 param_type _M_param;
2952 template<
typename _RealType>
2956 {
return !(__d1 == __d2); }
2968 template<
typename _RealType,
typename _CharT,
typename _Traits>
2983 template<
typename _RealType,
typename _CharT,
typename _Traits>
2999 template<
typename _RealType =
double>
3003 "result_type must be a floating point type");
3016 _RealType __n = _RealType(1))
3017 : _M_m(__m), _M_n(__n)
3030 {
return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; }
3034 {
return !(__p1 == __p2); }
3043 _RealType __n = _RealType(1))
3044 : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2)
3049 : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2)
3067 {
return _M_param.m(); }
3071 {
return _M_param.n(); }
3078 {
return _M_param; }
3086 { _M_param = __param; }
3105 template<
typename _UniformRandomNumberGenerator>
3108 {
return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); }
3110 template<
typename _UniformRandomNumberGenerator>
3112 operator()(_UniformRandomNumberGenerator& __urng,
3113 const param_type& __p)
3117 return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n())
3118 / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m()));
3121 template<
typename _ForwardIterator,
3122 typename _UniformRandomNumberGenerator>
3124 __generate(_ForwardIterator __f, _ForwardIterator __t,
3125 _UniformRandomNumberGenerator& __urng)
3126 { this->__generate_impl(__f, __t, __urng); }
3128 template<
typename _ForwardIterator,
3129 typename _UniformRandomNumberGenerator>
3131 __generate(_ForwardIterator __f, _ForwardIterator __t,
3132 _UniformRandomNumberGenerator& __urng,
3133 const param_type& __p)
3134 { this->__generate_impl(__f, __t, __urng, __p); }
3136 template<
typename _UniformRandomNumberGenerator>
3139 _UniformRandomNumberGenerator& __urng)
3140 { this->__generate_impl(__f, __t, __urng); }
3142 template<
typename _UniformRandomNumberGenerator>
3145 _UniformRandomNumberGenerator& __urng,
3146 const param_type& __p)
3147 { this->__generate_impl(__f, __t, __urng, __p); }
3157 {
return (__d1._M_param == __d2._M_param
3158 && __d1._M_gd_x == __d2._M_gd_x
3159 && __d1._M_gd_y == __d2._M_gd_y); }
3171 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3186 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3192 template<
typename _ForwardIterator,
3193 typename _UniformRandomNumberGenerator>
3195 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3196 _UniformRandomNumberGenerator& __urng);
3198 template<
typename _ForwardIterator,
3199 typename _UniformRandomNumberGenerator>
3201 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3202 _UniformRandomNumberGenerator& __urng,
3203 const param_type& __p);
3205 param_type _M_param;
3213 template<
typename _RealType>
3217 {
return !(__d1 == __d2); }
3228 template<
typename _RealType =
double>
3232 "result_type must be a floating point type");
3254 {
return __p1._M_n == __p2._M_n; }
3258 {
return !(__p1 == __p2); }
3266 : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2)
3271 : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2)
3289 {
return _M_param.n(); }
3296 {
return _M_param; }
3304 { _M_param = __param; }
3323 template<
typename _UniformRandomNumberGenerator>
3326 {
return _M_nd(__urng) *
std::sqrt(n() / _M_gd(__urng)); }
3328 template<
typename _UniformRandomNumberGenerator>
3330 operator()(_UniformRandomNumberGenerator& __urng,
3331 const param_type& __p)
3336 const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2));
3337 return _M_nd(__urng) *
std::sqrt(__p.n() / __g);
3340 template<
typename _ForwardIterator,
3341 typename _UniformRandomNumberGenerator>
3343 __generate(_ForwardIterator __f, _ForwardIterator __t,
3344 _UniformRandomNumberGenerator& __urng)
3345 { this->__generate_impl(__f, __t, __urng); }
3347 template<
typename _ForwardIterator,
3348 typename _UniformRandomNumberGenerator>
3350 __generate(_ForwardIterator __f, _ForwardIterator __t,
3351 _UniformRandomNumberGenerator& __urng,
3352 const param_type& __p)
3353 { this->__generate_impl(__f, __t, __urng, __p); }
3355 template<
typename _UniformRandomNumberGenerator>
3358 _UniformRandomNumberGenerator& __urng)
3359 { this->__generate_impl(__f, __t, __urng); }
3361 template<
typename _UniformRandomNumberGenerator>
3364 _UniformRandomNumberGenerator& __urng,
3365 const param_type& __p)
3366 { this->__generate_impl(__f, __t, __urng, __p); }
3376 {
return (__d1._M_param == __d2._M_param
3377 && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
3389 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3404 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3410 template<
typename _ForwardIterator,
3411 typename _UniformRandomNumberGenerator>
3413 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3414 _UniformRandomNumberGenerator& __urng);
3415 template<
typename _ForwardIterator,
3416 typename _UniformRandomNumberGenerator>
3418 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3419 _UniformRandomNumberGenerator& __urng,
3420 const param_type& __p);
3422 param_type _M_param;
3431 template<
typename _RealType>
3435 {
return !(__d1 == __d2); }
3467 __glibcxx_assert((_M_p >= 0.0) && (_M_p <= 1.0));
3476 {
return __p1._M_p == __p2._M_p; }
3480 {
return !(__p1 == __p2); }
3516 {
return _M_param.p(); }
3523 {
return _M_param; }
3531 { _M_param = __param; }
3550 template<
typename _UniformRandomNumberGenerator>
3553 {
return this->
operator()(__urng, _M_param); }
3555 template<
typename _UniformRandomNumberGenerator>
3557 operator()(_UniformRandomNumberGenerator& __urng,
3558 const param_type& __p)
3560 __detail::_Adaptor<_UniformRandomNumberGenerator, double>
3562 if ((__aurng() - __aurng.min())
3563 < __p.p() * (__aurng.max() - __aurng.min()))
3568 template<
typename _ForwardIterator,
3569 typename _UniformRandomNumberGenerator>
3571 __generate(_ForwardIterator __f, _ForwardIterator __t,
3572 _UniformRandomNumberGenerator& __urng)
3573 { this->__generate(__f, __t, __urng, _M_param); }
3575 template<
typename _ForwardIterator,
3576 typename _UniformRandomNumberGenerator>
3578 __generate(_ForwardIterator __f, _ForwardIterator __t,
3579 _UniformRandomNumberGenerator& __urng,
const param_type& __p)
3580 { this->__generate_impl(__f, __t, __urng, __p); }
3582 template<
typename _UniformRandomNumberGenerator>
3585 _UniformRandomNumberGenerator& __urng,
3586 const param_type& __p)
3587 { this->__generate_impl(__f, __t, __urng, __p); }
3596 {
return __d1._M_param == __d2._M_param; }
3599 template<
typename _ForwardIterator,
3600 typename _UniformRandomNumberGenerator>
3602 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3603 _UniformRandomNumberGenerator& __urng,
3604 const param_type& __p);
3606 param_type _M_param;
3616 {
return !(__d1 == __d2); }
3628 template<
typename _CharT,
typename _Traits>
3642 template<
typename _CharT,
typename _Traits>
3661 template<
typename _IntType =
int>
3665 "result_type must be an integral type");
3678 param_type(_IntType __t = _IntType(1),
double __p = 0.5)
3679 : _M_t(__t), _M_p(__p)
3681 __glibcxx_assert((_M_t >= _IntType(0))
3697 {
return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; }
3701 {
return !(__p1 == __p2); }
3711 #if _GLIBCXX_USE_C99_MATH_TR1 3712 double _M_d1, _M_d2, _M_s1, _M_s2, _M_c,
3713 _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p;
3722 : _M_param(__t, __p), _M_nd()
3727 : _M_param(__p), _M_nd()
3742 {
return _M_param.t(); }
3749 {
return _M_param.p(); }
3756 {
return _M_param; }
3764 { _M_param = __param; }
3778 {
return _M_param.t(); }
3783 template<
typename _UniformRandomNumberGenerator>
3786 {
return this->
operator()(__urng, _M_param); }
3788 template<
typename _UniformRandomNumberGenerator>
3790 operator()(_UniformRandomNumberGenerator& __urng,
3791 const param_type& __p);
3793 template<
typename _ForwardIterator,
3794 typename _UniformRandomNumberGenerator>
3796 __generate(_ForwardIterator __f, _ForwardIterator __t,
3797 _UniformRandomNumberGenerator& __urng)
3798 { this->__generate(__f, __t, __urng, _M_param); }
3800 template<
typename _ForwardIterator,
3801 typename _UniformRandomNumberGenerator>
3803 __generate(_ForwardIterator __f, _ForwardIterator __t,
3804 _UniformRandomNumberGenerator& __urng,
3805 const param_type& __p)
3806 { this->__generate_impl(__f, __t, __urng, __p); }
3808 template<
typename _UniformRandomNumberGenerator>
3811 _UniformRandomNumberGenerator& __urng,
3812 const param_type& __p)
3813 { this->__generate_impl(__f, __t, __urng, __p); }
3823 #ifdef _GLIBCXX_USE_C99_MATH_TR1 3824 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
3826 {
return __d1._M_param == __d2._M_param; }
3839 template<
typename _IntType1,
3840 typename _CharT,
typename _Traits>
3855 template<
typename _IntType1,
3856 typename _CharT,
typename _Traits>
3862 template<
typename _ForwardIterator,
3863 typename _UniformRandomNumberGenerator>
3865 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
3866 _UniformRandomNumberGenerator& __urng,
3867 const param_type& __p);
3869 template<
typename _UniformRandomNumberGenerator>
3871 _M_waiting(_UniformRandomNumberGenerator& __urng,
3872 _IntType __t,
double __q);
3874 param_type _M_param;
3883 template<
typename _IntType>
3887 {
return !(__d1 == __d2); }
3897 template<
typename _IntType =
int>
3901 "result_type must be an integral type");
3917 __glibcxx_assert((_M_p > 0.0) && (_M_p < 1.0));
3927 {
return __p1._M_p == __p2._M_p; }
3931 {
return !(__p1 == __p2); }
3936 { _M_log_1_p =
std::log(1.0 - _M_p); }
3967 {
return _M_param.p(); }
3974 {
return _M_param; }
3982 { _M_param = __param; }
4001 template<
typename _UniformRandomNumberGenerator>
4004 {
return this->
operator()(__urng, _M_param); }
4006 template<
typename _UniformRandomNumberGenerator>
4008 operator()(_UniformRandomNumberGenerator& __urng,
4009 const param_type& __p);
4011 template<
typename _ForwardIterator,
4012 typename _UniformRandomNumberGenerator>
4014 __generate(_ForwardIterator __f, _ForwardIterator __t,
4015 _UniformRandomNumberGenerator& __urng)
4016 { this->__generate(__f, __t, __urng, _M_param); }
4018 template<
typename _ForwardIterator,
4019 typename _UniformRandomNumberGenerator>
4021 __generate(_ForwardIterator __f, _ForwardIterator __t,
4022 _UniformRandomNumberGenerator& __urng,
4023 const param_type& __p)
4024 { this->__generate_impl(__f, __t, __urng, __p); }
4026 template<
typename _UniformRandomNumberGenerator>
4029 _UniformRandomNumberGenerator& __urng,
4030 const param_type& __p)
4031 { this->__generate_impl(__f, __t, __urng, __p); }
4040 {
return __d1._M_param == __d2._M_param; }
4043 template<
typename _ForwardIterator,
4044 typename _UniformRandomNumberGenerator>
4046 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4047 _UniformRandomNumberGenerator& __urng,
4048 const param_type& __p);
4050 param_type _M_param;
4057 template<
typename _IntType>
4061 {
return !(__d1 == __d2); }
4073 template<
typename _IntType,
4074 typename _CharT,
typename _Traits>
4088 template<
typename _IntType,
4089 typename _CharT,
typename _Traits>
4102 template<
typename _IntType =
int>
4106 "result_type must be an integral type");
4118 param_type(_IntType __k = 1,
double __p = 0.5)
4119 : _M_k(__k), _M_p(__p)
4121 __glibcxx_assert((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0));
4134 {
return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; }
4138 {
return !(__p1 == __p2); }
4147 : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p)
4152 : _M_param(__p), _M_gd(__p.
k(), (1.0 - __p.
p()) / __p.
p())
4167 {
return _M_param.k(); }
4174 {
return _M_param.p(); }
4181 {
return _M_param; }
4189 { _M_param = __param; }
4208 template<
typename _UniformRandomNumberGenerator>
4210 operator()(_UniformRandomNumberGenerator& __urng);
4212 template<
typename _UniformRandomNumberGenerator>
4214 operator()(_UniformRandomNumberGenerator& __urng,
4215 const param_type& __p);
4217 template<
typename _ForwardIterator,
4218 typename _UniformRandomNumberGenerator>
4220 __generate(_ForwardIterator __f, _ForwardIterator __t,
4221 _UniformRandomNumberGenerator& __urng)
4222 { this->__generate_impl(__f, __t, __urng); }
4224 template<
typename _ForwardIterator,
4225 typename _UniformRandomNumberGenerator>
4227 __generate(_ForwardIterator __f, _ForwardIterator __t,
4228 _UniformRandomNumberGenerator& __urng,
4229 const param_type& __p)
4230 { this->__generate_impl(__f, __t, __urng, __p); }
4232 template<
typename _UniformRandomNumberGenerator>
4235 _UniformRandomNumberGenerator& __urng)
4236 { this->__generate_impl(__f, __t, __urng); }
4238 template<
typename _UniformRandomNumberGenerator>
4241 _UniformRandomNumberGenerator& __urng,
4242 const param_type& __p)
4243 { this->__generate_impl(__f, __t, __urng, __p); }
4253 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
4266 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4281 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4287 template<
typename _ForwardIterator,
4288 typename _UniformRandomNumberGenerator>
4290 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4291 _UniformRandomNumberGenerator& __urng);
4292 template<
typename _ForwardIterator,
4293 typename _UniformRandomNumberGenerator>
4295 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4296 _UniformRandomNumberGenerator& __urng,
4297 const param_type& __p);
4299 param_type _M_param;
4307 template<
typename _IntType>
4311 {
return !(__d1 == __d2); }
4329 template<
typename _IntType =
int>
4333 "result_type must be an integral type");
4349 __glibcxx_assert(_M_mean > 0.0);
4359 {
return __p1._M_mean == __p2._M_mean; }
4363 {
return !(__p1 == __p2); }
4373 #if _GLIBCXX_USE_C99_MATH_TR1 4374 double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb;
4381 : _M_param(__mean), _M_nd()
4386 : _M_param(__p), _M_nd()
4401 {
return _M_param.mean(); }
4408 {
return _M_param; }
4416 { _M_param = __param; }
4435 template<
typename _UniformRandomNumberGenerator>
4438 {
return this->
operator()(__urng, _M_param); }
4440 template<
typename _UniformRandomNumberGenerator>
4442 operator()(_UniformRandomNumberGenerator& __urng,
4443 const param_type& __p);
4445 template<
typename _ForwardIterator,
4446 typename _UniformRandomNumberGenerator>
4448 __generate(_ForwardIterator __f, _ForwardIterator __t,
4449 _UniformRandomNumberGenerator& __urng)
4450 { this->__generate(__f, __t, __urng, _M_param); }
4452 template<
typename _ForwardIterator,
4453 typename _UniformRandomNumberGenerator>
4455 __generate(_ForwardIterator __f, _ForwardIterator __t,
4456 _UniformRandomNumberGenerator& __urng,
4457 const param_type& __p)
4458 { this->__generate_impl(__f, __t, __urng, __p); }
4460 template<
typename _UniformRandomNumberGenerator>
4463 _UniformRandomNumberGenerator& __urng,
4464 const param_type& __p)
4465 { this->__generate_impl(__f, __t, __urng, __p); }
4475 #ifdef _GLIBCXX_USE_C99_MATH_TR1 4476 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
4478 {
return __d1._M_param == __d2._M_param; }
4491 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4506 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4512 template<
typename _ForwardIterator,
4513 typename _UniformRandomNumberGenerator>
4515 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4516 _UniformRandomNumberGenerator& __urng,
4517 const param_type& __p);
4519 param_type _M_param;
4528 template<
typename _IntType>
4532 {
return !(__d1 == __d2); }
4550 template<
typename _RealType =
double>
4554 "result_type must be a floating point type");
4566 param_type(_RealType __lambda = _RealType(1))
4567 : _M_lambda(__lambda)
4569 __glibcxx_assert(_M_lambda > _RealType(0));
4574 {
return _M_lambda; }
4578 {
return __p1._M_lambda == __p2._M_lambda; }
4582 {
return !(__p1 == __p2); }
4585 _RealType _M_lambda;
4595 : _M_param(__lambda)
4616 {
return _M_param.lambda(); }
4623 {
return _M_param; }
4631 { _M_param = __param; }
4650 template<
typename _UniformRandomNumberGenerator>
4653 {
return this->
operator()(__urng, _M_param); }
4655 template<
typename _UniformRandomNumberGenerator>
4657 operator()(_UniformRandomNumberGenerator& __urng,
4658 const param_type& __p)
4660 __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
4665 template<
typename _ForwardIterator,
4666 typename _UniformRandomNumberGenerator>
4668 __generate(_ForwardIterator __f, _ForwardIterator __t,
4669 _UniformRandomNumberGenerator& __urng)
4670 { this->__generate(__f, __t, __urng, _M_param); }
4672 template<
typename _ForwardIterator,
4673 typename _UniformRandomNumberGenerator>
4675 __generate(_ForwardIterator __f, _ForwardIterator __t,
4676 _UniformRandomNumberGenerator& __urng,
4677 const param_type& __p)
4678 { this->__generate_impl(__f, __t, __urng, __p); }
4680 template<
typename _UniformRandomNumberGenerator>
4683 _UniformRandomNumberGenerator& __urng,
4684 const param_type& __p)
4685 { this->__generate_impl(__f, __t, __urng, __p); }
4694 {
return __d1._M_param == __d2._M_param; }
4697 template<
typename _ForwardIterator,
4698 typename _UniformRandomNumberGenerator>
4700 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4701 _UniformRandomNumberGenerator& __urng,
4702 const param_type& __p);
4704 param_type _M_param;
4711 template<
typename _RealType>
4715 {
return !(__d1 == __d2); }
4727 template<
typename _RealType,
typename _CharT,
typename _Traits>
4742 template<
typename _RealType,
typename _CharT,
typename _Traits>
4757 template<
typename _RealType =
double>
4761 "result_type must be a floating point type");
4774 _RealType __b = _RealType(1))
4775 : _M_a(__a), _M_b(__b)
4788 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
4792 {
return !(__p1 == __p2); }
4801 _RealType __b = _RealType(1))
4802 : _M_param(__a, __b)
4822 {
return _M_param.a(); }
4829 {
return _M_param.b(); }
4836 {
return _M_param; }
4844 { _M_param = __param; }
4863 template<
typename _UniformRandomNumberGenerator>
4866 {
return this->
operator()(__urng, _M_param); }
4868 template<
typename _UniformRandomNumberGenerator>
4870 operator()(_UniformRandomNumberGenerator& __urng,
4871 const param_type& __p);
4873 template<
typename _ForwardIterator,
4874 typename _UniformRandomNumberGenerator>
4876 __generate(_ForwardIterator __f, _ForwardIterator __t,
4877 _UniformRandomNumberGenerator& __urng)
4878 { this->__generate(__f, __t, __urng, _M_param); }
4880 template<
typename _ForwardIterator,
4881 typename _UniformRandomNumberGenerator>
4883 __generate(_ForwardIterator __f, _ForwardIterator __t,
4884 _UniformRandomNumberGenerator& __urng,
4885 const param_type& __p)
4886 { this->__generate_impl(__f, __t, __urng, __p); }
4888 template<
typename _UniformRandomNumberGenerator>
4891 _UniformRandomNumberGenerator& __urng,
4892 const param_type& __p)
4893 { this->__generate_impl(__f, __t, __urng, __p); }
4902 {
return __d1._M_param == __d2._M_param; }
4905 template<
typename _ForwardIterator,
4906 typename _UniformRandomNumberGenerator>
4908 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
4909 _UniformRandomNumberGenerator& __urng,
4910 const param_type& __p);
4912 param_type _M_param;
4919 template<
typename _RealType>
4923 {
return !(__d1 == __d2); }
4935 template<
typename _RealType,
typename _CharT,
typename _Traits>
4950 template<
typename _RealType,
typename _CharT,
typename _Traits>
4965 template<
typename _RealType =
double>
4969 "result_type must be a floating point type");
4982 _RealType __b = _RealType(1))
4983 : _M_a(__a), _M_b(__b)
4996 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
5000 {
return !(__p1 == __p2); }
5009 _RealType __b = _RealType(1))
5010 : _M_param(__a, __b)
5030 {
return _M_param.a(); }
5037 {
return _M_param.b(); }
5044 {
return _M_param; }
5052 { _M_param = __param; }
5071 template<
typename _UniformRandomNumberGenerator>
5074 {
return this->
operator()(__urng, _M_param); }
5076 template<
typename _UniformRandomNumberGenerator>
5078 operator()(_UniformRandomNumberGenerator& __urng,
5079 const param_type& __p);
5081 template<
typename _ForwardIterator,
5082 typename _UniformRandomNumberGenerator>
5084 __generate(_ForwardIterator __f, _ForwardIterator __t,
5085 _UniformRandomNumberGenerator& __urng)
5086 { this->__generate(__f, __t, __urng, _M_param); }
5088 template<
typename _ForwardIterator,
5089 typename _UniformRandomNumberGenerator>
5091 __generate(_ForwardIterator __f, _ForwardIterator __t,
5092 _UniformRandomNumberGenerator& __urng,
5093 const param_type& __p)
5094 { this->__generate_impl(__f, __t, __urng, __p); }
5096 template<
typename _UniformRandomNumberGenerator>
5099 _UniformRandomNumberGenerator& __urng,
5100 const param_type& __p)
5101 { this->__generate_impl(__f, __t, __urng, __p); }
5110 {
return __d1._M_param == __d2._M_param; }
5113 template<
typename _ForwardIterator,
5114 typename _UniformRandomNumberGenerator>
5116 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5117 _UniformRandomNumberGenerator& __urng,
5118 const param_type& __p);
5120 param_type _M_param;
5127 template<
typename _RealType>
5131 {
return !(__d1 == __d2); }
5143 template<
typename _RealType,
typename _CharT,
typename _Traits>
5158 template<
typename _RealType,
typename _CharT,
typename _Traits>
5170 template<
typename _IntType =
int>
5174 "result_type must be an integral type");
5187 : _M_prob(), _M_cp()
5190 template<
typename _InputIterator>
5192 _InputIterator __wend)
5193 : _M_prob(__wbegin, __wend), _M_cp()
5194 { _M_initialize(); }
5197 : _M_prob(__wil.begin(), __wil.end()), _M_cp()
5198 { _M_initialize(); }
5200 template<
typename _Func>
5201 param_type(
size_t __nw,
double __xmin,
double __xmax,
5209 probabilities()
const 5214 {
return __p1._M_prob == __p2._M_prob; }
5218 {
return !(__p1 == __p2); }
5232 template<
typename _InputIterator>
5234 _InputIterator __wend)
5235 : _M_param(__wbegin, __wend)
5238 discrete_distribution(initializer_list<double> __wl)
5242 template<
typename _Func>
5243 discrete_distribution(
size_t __nw,
double __xmin,
double __xmax,
5245 : _M_param(__nw, __xmin, __xmax, __fw)
5249 discrete_distribution(
const param_type& __p)
5266 return _M_param._M_prob.
empty()
5275 {
return _M_param; }
5283 { _M_param = __param; }
5298 return _M_param._M_prob.
empty()
5305 template<
typename _UniformRandomNumberGenerator>
5308 {
return this->
operator()(__urng, _M_param); }
5310 template<
typename _UniformRandomNumberGenerator>
5312 operator()(_UniformRandomNumberGenerator& __urng,
5313 const param_type& __p);
5315 template<
typename _ForwardIterator,
5316 typename _UniformRandomNumberGenerator>
5318 __generate(_ForwardIterator __f, _ForwardIterator __t,
5319 _UniformRandomNumberGenerator& __urng)
5320 { this->__generate(__f, __t, __urng, _M_param); }
5322 template<
typename _ForwardIterator,
5323 typename _UniformRandomNumberGenerator>
5325 __generate(_ForwardIterator __f, _ForwardIterator __t,
5326 _UniformRandomNumberGenerator& __urng,
5327 const param_type& __p)
5328 { this->__generate_impl(__f, __t, __urng, __p); }
5330 template<
typename _UniformRandomNumberGenerator>
5333 _UniformRandomNumberGenerator& __urng,
5334 const param_type& __p)
5335 { this->__generate_impl(__f, __t, __urng, __p); }
5344 {
return __d1._M_param == __d2._M_param; }
5356 template<
typename _IntType1,
typename _CharT,
typename _Traits>
5372 template<
typename _IntType1,
typename _CharT,
typename _Traits>
5378 template<
typename _ForwardIterator,
5379 typename _UniformRandomNumberGenerator>
5381 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5382 _UniformRandomNumberGenerator& __urng,
5383 const param_type& __p);
5385 param_type _M_param;
5392 template<
typename _IntType>
5396 {
return !(__d1 == __d2); }
5405 template<
typename _RealType =
double>
5409 "result_type must be a floating point type");
5422 : _M_int(), _M_den(), _M_cp()
5425 template<
typename _InputIteratorB,
typename _InputIteratorW>
5427 _InputIteratorB __bend,
5428 _InputIteratorW __wbegin);
5430 template<
typename _Func>
5433 template<
typename _Func>
5434 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
5447 __tmp[1] = _RealType(1);
5460 {
return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
5464 {
return !(__p1 == __p2); }
5480 template<
typename _InputIteratorB,
typename _InputIteratorW>
5482 _InputIteratorB __bend,
5483 _InputIteratorW __wbegin)
5484 : _M_param(__bfirst, __bend, __wbegin)
5487 template<
typename _Func>
5488 piecewise_constant_distribution(initializer_list<_RealType> __bl,
5490 : _M_param(__bl, __fw)
5493 template<
typename _Func>
5494 piecewise_constant_distribution(
size_t __nw,
5495 _RealType __xmin, _RealType __xmax,
5497 : _M_param(__nw, __xmin, __xmax, __fw)
5501 piecewise_constant_distribution(
const param_type& __p)
5518 if (_M_param._M_int.
empty())
5521 __tmp[1] = _RealType(1);
5525 return _M_param._M_int;
5534 return _M_param._M_den.
empty()
5543 {
return _M_param; }
5551 { _M_param = __param; }
5559 return _M_param._M_int.
empty()
5569 return _M_param._M_int.
empty()
5576 template<
typename _UniformRandomNumberGenerator>
5579 {
return this->
operator()(__urng, _M_param); }
5581 template<
typename _UniformRandomNumberGenerator>
5583 operator()(_UniformRandomNumberGenerator& __urng,
5584 const param_type& __p);
5586 template<
typename _ForwardIterator,
5587 typename _UniformRandomNumberGenerator>
5589 __generate(_ForwardIterator __f, _ForwardIterator __t,
5590 _UniformRandomNumberGenerator& __urng)
5591 { this->__generate(__f, __t, __urng, _M_param); }
5593 template<
typename _ForwardIterator,
5594 typename _UniformRandomNumberGenerator>
5596 __generate(_ForwardIterator __f, _ForwardIterator __t,
5597 _UniformRandomNumberGenerator& __urng,
5598 const param_type& __p)
5599 { this->__generate_impl(__f, __t, __urng, __p); }
5601 template<
typename _UniformRandomNumberGenerator>
5604 _UniformRandomNumberGenerator& __urng,
5605 const param_type& __p)
5606 { this->__generate_impl(__f, __t, __urng, __p); }
5615 {
return __d1._M_param == __d2._M_param; }
5628 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5644 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5650 template<
typename _ForwardIterator,
5651 typename _UniformRandomNumberGenerator>
5653 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5654 _UniformRandomNumberGenerator& __urng,
5655 const param_type& __p);
5657 param_type _M_param;
5664 template<
typename _RealType>
5668 {
return !(__d1 == __d2); }
5677 template<
typename _RealType =
double>
5681 "result_type must be a floating point type");
5694 : _M_int(), _M_den(), _M_cp(), _M_m()
5697 template<
typename _InputIteratorB,
typename _InputIteratorW>
5699 _InputIteratorB __bend,
5700 _InputIteratorW __wbegin);
5702 template<
typename _Func>
5705 template<
typename _Func>
5706 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
5719 __tmp[1] = _RealType(1);
5732 {
return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
5736 {
return !(__p1 == __p2); }
5753 template<
typename _InputIteratorB,
typename _InputIteratorW>
5755 _InputIteratorB __bend,
5756 _InputIteratorW __wbegin)
5757 : _M_param(__bfirst, __bend, __wbegin)
5760 template<
typename _Func>
5761 piecewise_linear_distribution(initializer_list<_RealType> __bl,
5763 : _M_param(__bl, __fw)
5766 template<
typename _Func>
5767 piecewise_linear_distribution(
size_t __nw,
5768 _RealType __xmin, _RealType __xmax,
5770 : _M_param(__nw, __xmin, __xmax, __fw)
5774 piecewise_linear_distribution(
const param_type& __p)
5791 if (_M_param._M_int.
empty())
5794 __tmp[1] = _RealType(1);
5798 return _M_param._M_int;
5808 return _M_param._M_den.
empty()
5817 {
return _M_param; }
5825 { _M_param = __param; }
5833 return _M_param._M_int.
empty()
5843 return _M_param._M_int.
empty()
5850 template<
typename _UniformRandomNumberGenerator>
5853 {
return this->
operator()(__urng, _M_param); }
5855 template<
typename _UniformRandomNumberGenerator>
5857 operator()(_UniformRandomNumberGenerator& __urng,
5858 const param_type& __p);
5860 template<
typename _ForwardIterator,
5861 typename _UniformRandomNumberGenerator>
5863 __generate(_ForwardIterator __f, _ForwardIterator __t,
5864 _UniformRandomNumberGenerator& __urng)
5865 { this->__generate(__f, __t, __urng, _M_param); }
5867 template<
typename _ForwardIterator,
5868 typename _UniformRandomNumberGenerator>
5870 __generate(_ForwardIterator __f, _ForwardIterator __t,
5871 _UniformRandomNumberGenerator& __urng,
5872 const param_type& __p)
5873 { this->__generate_impl(__f, __t, __urng, __p); }
5875 template<
typename _UniformRandomNumberGenerator>
5878 _UniformRandomNumberGenerator& __urng,
5879 const param_type& __p)
5880 { this->__generate_impl(__f, __t, __urng, __p); }
5889 {
return __d1._M_param == __d2._M_param; }
5902 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5918 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5924 template<
typename _ForwardIterator,
5925 typename _UniformRandomNumberGenerator>
5927 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
5928 _UniformRandomNumberGenerator& __urng,
5929 const param_type& __p);
5931 param_type _M_param;
5938 template<
typename _RealType>
5942 {
return !(__d1 == __d2); }
5970 template<
typename _IntType>
5973 template<
typename _InputIterator>
5974 seed_seq(_InputIterator __begin, _InputIterator __end);
5977 template<
typename _RandomAccessIterator>
5979 generate(_RandomAccessIterator __begin, _RandomAccessIterator __end);
5982 size_t size() const noexcept
5983 {
return _M_v.
size(); }
5985 template<
typename _OutputIterator>
5987 param(_OutputIterator __dest)
const 5988 { std::copy(_M_v.
begin(), _M_v.
end(), __dest); }
6002 _GLIBCXX_END_NAMESPACE_VERSION
friend bool operator==(const discrete_distribution &__d1, const discrete_distribution &__d2)
Return true if two discrete distributions have the same parameters.
std::vector< double > densities() const
Return a vector of the probability densities of the distribution.
_RealType alpha() const
Returns the of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
A student_t_distribution random number distribution.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::linear_congruential_engine< _UIntType1, __a1, __c1, __m1 > &__lcr)
Writes the textual representation of the state x(i) of x to __os.
result_type operator()()
Gets the next random number in the sequence.
const _RandomNumberEngine & base() const noexcept
Gets a const reference to the underlying generator engine object.
result_type max() const
Returns the least upper bound value of the distribution.
param_type param() const
Returns the parameter set of the distribution.
A piecewise_linear_distribution random number distribution.
mersenne_twister_engine(_Sseq &__q)
Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence __q...
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.
static constexpr result_type min()
Gets the smallest possible value in the output range.
static constexpr result_type max()
Gets the largest possible value in the output range.
std::vector< double > densities() const
Returns a vector of the probability densities.
std::vector< _RealType > intervals() const
Returns a vector of the intervals.
param_type param() const
Returns the parameter set of the distribution.
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...
result_type min() const
Returns the greatest lower bound value of the distribution.
A chi_squared_distribution random number distribution.
void reset()
Resets the distribution state.
_RealType mean() const
Returns the mean of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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 discard(unsigned long long __z)
static constexpr result_type max()
Gets the largest possible value in the output range.
A extreme_value_distribution random number distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
const _RandomNumberEngine & base() const noexcept
Gets a const reference to the underlying generator engine object.
static constexpr _Tp max() noexcept
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type min() const
Returns the greatest lower bound value of the distribution.
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void reset()
Resets the distribution state.
The Marsaglia-Zaman generator.
result_type max() const
Returns the least upper bound value of the distribution.
void reset()
Resets the distribution state.
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...
_RandomNumberEngine::result_type result_type
result_type max() const
Returns the least upper bound value of the distribution.
param_type param() const
Returns the parameter set of the distribution.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::discard_block_engine< _RandomNumberEngine1, __p1, __r1 > &__x)
Inserts the current state of a discard_block_engine random number generator engine __x into the outpu...
A Bernoulli random number distribution.
friend bool operator==(const shuffle_order_engine &__lhs, const shuffle_order_engine &__rhs)
static constexpr result_type min()
Gets the smallest possible value in the output range.
static constexpr result_type increment
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type max() const
Returns the least upper bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend bool operator==(const bernoulli_distribution &__d1, const bernoulli_distribution &__d2)
Return true if two Bernoulli distributions have the same parameters.
result_type max() const
Returns the least upper bound value of the distribution.
The seed_seq class generates sequences of seeds for random number generators.
void param(const param_type &__param)
Sets the parameter set of the distribution.
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &__x)
Extracts the current state of a % subtract_with_carry_engine random number generator engine __x from ...
A cauchy_distribution random number distribution.
result_type min() const
Returns the greatest lower bound value 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...
reference front() noexcept
Define a member typedef type only if a boolean constant is true.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::gamma_distribution< _RealType1 > &__x)
Extracts a gamma_distribution random number distribution __x from the input stream __is.
reference back() noexcept
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
A discrete Poisson random number distribution.
static constexpr result_type max()
Gets the maximum value in the generated random number range.
double p() const
Return the parameter of the distribution.
_IntType k() const
Return the parameter of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
_RealType stddev() const
Returns the standard deviation of the distribution.
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.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &__x)
Inserts the current state of a shuffle_order_engine random number generator engine __x into the outpu...
void discard(unsigned long long __z)
Discard a sequence of random numbers.
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.
void reset()
Resets the distribution state.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::binomial_distribution< _IntType1 > &__x)
Inserts a binomial_distribution random number distribution __x into the output stream __os.
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.
A discrete binomial random number distribution.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::piecewise_constant_distribution< _RealType1 > &__x)
Extracts a piecewise_constant_distribution random number distribution __x from the input stream __is.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x)
Extracts the current state of a % mersenne_twister_engine random number generator engine __x from the...
gamma_distribution(_RealType __alpha_val=_RealType(1), _RealType __beta_val=_RealType(1))
Constructs a gamma distribution with parameters and .
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...
param_type param() const
Returns the parameter set of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::linear_congruential_engine< _UIntType1, __a1, __c1, __m1 > &__lcr)
Sets the state of the engine by reading its textual representation from __is.
friend bool operator==(const geometric_distribution &__d1, const geometric_distribution &__d2)
Return true if two geometric distributions have the same parameters.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
double p() const
Returns the distribution parameter p.
void reset()
Resets the distribution state.
double p() const
Returns the distribution p parameter.
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 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...
void discard(unsigned long long __z)
Discard a sequence of random numbers.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::subtract_with_carry_engine< _UIntType1, __w1, __s1, __r1 > &__x)
Inserts the current state of a % subtract_with_carry_engine random number generator engine __x into t...
result_type operator()()
Gets the next value in the generated random number sequence.
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.
Template class basic_istream.
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.
static constexpr result_type max()
Gets the maximum value in the generated random number range.
result_type min() const
Returns the greatest lower bound value of the distribution.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::subtract_with_carry_engine< _UIntType1, __w1, __s1, __r1 > &__x)
Extracts the current state of a % subtract_with_carry_engine random number generator engine __x from ...
_RealType generate_canonical(_UniformRandomNumberGenerator &__g)
A function template for converting the output of a (integral) uniform random number generator to a fl...
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.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::piecewise_linear_distribution< _RealType1 > &__x)
Extracts a piecewise_linear_distribution random number distribution __x from the input stream __is.
discard_block_engine(_RandomNumberEngine &&__rng)
Move constructs a discard_block_engine engine.
A discrete geometric random number distribution.
param_type param() const
Returns the parameter set of the distribution.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::piecewise_linear_distribution< _RealType1 > &__x)
Inserts a piecewise_linear_distribution random number distribution __x into the output stream __os.
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.
Properties of fundamental types.
discard_block_engine(const _RandomNumberEngine &__rng)
Copy constructs a discard_block_engine engine.
double p() const
Returns the p parameter of the 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.
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...
bernoulli_distribution(double __p=0.5)
Constructs a Bernoulli distribution with likelihood p.
static constexpr result_type multiplier
_RealType b() const
Return the parameter of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
std::vector< _RealType > intervals() const
Return the intervals of the distribution.
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.
_RealType b() const
Return the parameter of the distribution.
double mean() const
Returns the distribution parameter mean.
_IntType t() const
Returns the distribution t parameter.
void reset()
Resets the distribution state.
independent_bits_engine()
Constructs a default independent_bits_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.
shuffle_order_engine(result_type __s)
Seed constructs a shuffle_order_engine engine.
param_type param() const
Returns the parameter set of the distribution.
void seed(result_type __s)
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
void param(const param_type &__param)
Sets the parameter set of the distribution.
_RandomNumberEngine::result_type result_type
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::fisher_f_distribution< _RealType1 > &__x)
Inserts a fisher_f_distribution random number distribution __x into the output stream __os.
linear_congruential_engine(result_type __s=default_seed)
Constructs a linear_congruential_engine random number generator engine with seed __s....
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::discard_block_engine< _RandomNumberEngine1, __p1, __r1 > &__x)
Extracts the current state of a % subtract_with_carry_engine random number generator engine __x from ...
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::negative_binomial_distribution< _IntType1 > &__x)
Extracts a negative_binomial_distribution random number distribution __x from the input stream __is.
ISO C++ entities toplevel namespace is std.
result_type min() const
Returns the greatest lower bound value of the distribution.
static constexpr result_type min()
static constexpr result_type min()
Gets the minimum value in the generated random number range.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
mersenne_twister_engine< uint_fast64_t, 64, 312, 156, 31, 0xb5026f5aa96619e9ULL, 29, 0x5555555555555555ULL, 17, 0x71d67fffeda60000ULL, 37, 0xfff7eee000000000ULL, 43, 6364136223846793005ULL > mt19937_64
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::discrete_distribution< _IntType1 > &__x)
Extracts a discrete_distribution random number distribution __x from the input stream __is.
result_type min() const
Returns the greatest lower bound value of the distribution.
shuffle_order_engine()
Constructs a default shuffle_order_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
_RealType lambda() const
Returns the inverse scale parameter of the distribution.
param_type param() const
Returns the parameter set of the distribution.
normal_distribution(result_type __mean=result_type(0), result_type __stddev=result_type(1))
static constexpr _Tp min() noexcept
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::gamma_distribution< _RealType1 > &__x)
Inserts a gamma_distribution random number distribution __x into the output stream __os.
shuffle_order_engine(const _RandomNumberEngine &__rng)
Copy constructs a shuffle_order_engine engine.
static constexpr result_type max()
Gets the inclusive maximum value of the range of random integers returned by this generator.
A normal continuous distribution for random numbers.
param_type param() const
Returns the parameter set of the distribution.
iterator begin() noexcept
param_type param() const
Returns the parameter set of the distribution.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::discrete_distribution< _IntType1 > &__x)
Inserts a discrete_distribution random number distribution __x into the output stream __os.
Template class basic_ostream.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::chi_squared_distribution< _RealType1 > &__x)
Extracts a chi_squared_distribution random number distribution __x from the input stream __is.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::normal_distribution< _RealType1 > &__x)
Extracts a normal_distribution random number distribution __x from the input stream __is.
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.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void seed(result_type __s=default_seed)
Reseeds the linear_congruential_engine random number generator engine sequence to the seed __s.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
discard_block_engine()
Constructs a default discard_block_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
discard_block_engine(result_type __s)
Seed constructs a discard_block_engine engine.
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 std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::normal_distribution< _RealType1 > &__x)
Inserts a normal_distribution random number distribution __x into the output stream __os.
result_type operator()()
Gets the next random number in the sequence.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::binomial_distribution< _IntType1 > &__x)
Extracts a binomial_distribution random number distribution __x from the input stream __is.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x)
Inserts the current state of a % mersenne_twister_engine random number generator engine __x into the ...
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...
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::poisson_distribution< _IntType1 > &__x)
Inserts a poisson_distribution random number distribution __x into the output stream __os.
_RealType a() const
Return the parameter of the distribution.
A discrete_distribution random number distribution.
result_type max() const
Returns the least upper bound value 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 max() const
Returns the inclusive upper bound of the distribution range.
mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL > mt19937
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::lognormal_distribution< _RealType1 > &__x)
Extracts a lognormal_distribution random number distribution __x from the input stream __is.
uniform_real_distribution(_RealType __a=_RealType(0), _RealType __b=_RealType(1))
Constructs a uniform_real_distribution object.
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.
param_type param() const
Returns the parameter set of the distribution.
shuffle_order_engine(_RandomNumberEngine &&__rng)
Move constructs a shuffle_order_engine engine.
void seed(result_type __s)
Reseeds the discard_block_engine object with the default seed for the underlying base class generator...
linear_congruential_engine< uint_fast32_t, 48271UL, 0UL, 2147483647UL > minstd_rand
friend bool operator==(const exponential_distribution &__d1, const exponential_distribution &__d2)
Return true if two exponential distributions have the same parameters.
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...
constexpr int __lg(int __n)
This is a helper function for the sort routines and for random.tcc.
static constexpr result_type min()
Gets the minimum value in the generated random number range.
linear_congruential_engine< uint_fast32_t, 16807UL, 0UL, 2147483647UL > minstd_rand0
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::piecewise_constant_distribution< _RealType1 > &__x)
Inserts a piecewise_constant_distribution random number distribution __x into the output stream __os.
void reset()
Resets the distribution state.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::poisson_distribution< _IntType1 > &__x)
Extracts a poisson_distribution random number distribution __x from the input stream __is.
param_type param() const
Returns the parameter set of the distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
static constexpr result_type max()
friend bool operator==(const piecewise_constant_distribution &__d1, const piecewise_constant_distribution &__d2)
Return true if two piecewise constant distributions have the same parameters.
friend bool operator==(const weibull_distribution &__d1, const weibull_distribution &__d2)
Return true if two Weibull distributions have the same parameters.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void reset()
Resets the distribution state.
A fisher_f_distribution random number distribution.
void reset()
Resets the distribution state.
void reset()
Resets the distribution state.
void reset()
Resets the distribution state.
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.
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.
param_type param() const
Returns the parameter set of the distribution.
independent_bits_engine(const _RandomNumberEngine &__rng)
Copy constructs a independent_bits_engine engine.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend bool operator==(const std::normal_distribution< _RealType1 > &__d1, const std::normal_distribution< _RealType1 > &__d2)
Return true if two normal distributions have the same parameters and the sequences that would be gene...
bool empty() const noexcept
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type min() const
Returns the greatest lower bound value of the distribution.
void reset()
Resets the distribution state.
param_type param() const
Returns the parameter set of the distribution.
independent_bits_engine(_Sseq &__q)
Generator construct a independent_bits_engine engine.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::lognormal_distribution< _RealType1 > &__x)
Inserts a lognormal_distribution random number distribution __x into the output stream __os.
result_type min() const
Returns the greatest lower 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.
void reset()
Resets the distribution state.
void seed()
Reseeds the discard_block_engine object with the default seed for the underlying base class generator...
void param(const param_type &__param)
Sets the parameter set of the distribution.
void seed(_Sseq &__q)
Reseeds the discard_block_engine object with the given seed sequence.
subtract_with_carry_engine(result_type __sd=default_seed)
Constructs an explicitly seeded % subtract_with_carry_engine random number generator.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::chi_squared_distribution< _RealType1 > &__x)
Inserts a chi_squared_distribution random number distribution __x into the output stream __os.
A lognormal_distribution random number distribution.
void reset()
Resets the distribution state.
static constexpr result_type min()
Gets the inclusive minimum value of the range of random integers returned by this generator.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::student_t_distribution< _RealType1 > &__x)
Inserts a student_t_distribution random number distribution __x into the output stream __os.
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.
void seed(result_type __sd=default_seed)
Seeds the initial state of the random number generator.
bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
Tests a range for element-wise equality.
A model of a linear congruential random number generator.
An exponential continuous distribution for random numbers.
discard_block_engine(_Sseq &__q)
Generator construct a discard_block_engine engine.
param_type param() const
Returns the parameter set of the distribution.
static constexpr _Tp lowest() noexcept
Uniform discrete distribution for random numbers. A discrete random distribution on the range with e...
linear_congruential_engine(_Sseq &__q)
Constructs a linear_congruential_engine random number generator engine seeded from the seed sequence ...
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 operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const std::negative_binomial_distribution< _IntType1 > &__x)
Inserts a negative_binomial_distribution random number distribution __x into the output stream __os.
const _RandomNumberEngine & base() const noexcept
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::student_t_distribution< _RealType1 > &__x)
Extracts a student_t_distribution random number distribution __x from the input stream __is.
void param(const param_type &__param)
Sets the parameter set of the 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.
void seed()
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
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.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
size_type size() const noexcept
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
void reset()
Resets the distribution state.
A piecewise_constant_distribution random number distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
independent_bits_engine(result_type __s)
Seed constructs a independent_bits_engine engine.
void reset()
Resets the distribution state.
std::vector< double > probabilities() const
Returns the probabilities of the distribution.
independent_bits_engine(_RandomNumberEngine &&__rng)
Move constructs a independent_bits_engine engine.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::fisher_f_distribution< _RealType1 > &__x)
Extracts a fisher_f_distribution random number distribution __x from the input stream __is.
void param(const param_type &__param)
Sets the parameter set of the distribution.
exponential_distribution(const result_type &__lambda=result_type(1))
Constructs an exponential distribution with inverse scale parameter .
result_type min() const
Returns the greatest lower bound value of the distribution.
A negative_binomial_distribution random number distribution.
uint_least32_t result_type
Produces random numbers by combining random numbers from some base engine to produce random numbers w...
result_type operator()()
Gets the next value in the generated random number sequence.
void seed()
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
A gamma continuous distribution for random numbers.
_RealType beta() const
Returns the of the distribution.
param_type param() const
Returns the parameter set of the distribution.
A weibull_distribution random number distribution.
result_type max() const
Returns the least upper bound value of the distribution.
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 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.
void seed(result_type __s)
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
One of the math functors.
Uniform continuous distribution for random numbers.
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
void seed(_Sseq &__q)
Reseeds the shuffle_order_engine object with the given seed sequence.
_RealType a() const
Return the parameter of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.