36 namespace std _GLIBCXX_VISIBILITY(default)
38 _GLIBCXX_BEGIN_NAMESPACE_VERSION
55 template<
typename _RealType,
size_t __bits,
56 typename _UniformRandomNumberGenerator>
60 _GLIBCXX_END_NAMESPACE_VERSION
67 _GLIBCXX_BEGIN_NAMESPACE_VERSION
69 template<
typename _UIntType,
size_t __w,
70 bool = __w < static_cast<size_t>
71 (std::numeric_limits<_UIntType>::digits)>
73 {
static const _UIntType __value = 0; };
75 template<
typename _UIntType,
size_t __w>
76 struct _Shift<_UIntType, __w, true>
77 {
static const _UIntType __value = _UIntType(1) << __w; };
79 template<
typename _Tp, _Tp __m, _Tp __a, _Tp __c,
bool>
84 template<
typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
87 {
return _Mod<_Tp, __m, __a, __c, __m == 0>::__calc(__x); }
93 template<
typename _Engine,
typename _DInputType>
98 _Adaptor(_Engine& __g)
103 {
return _DInputType(0); }
107 {
return _DInputType(1); }
118 std::numeric_limits<_DInputType>::digits,
126 _GLIBCXX_END_NAMESPACE_VERSION
129 _GLIBCXX_BEGIN_NAMESPACE_VERSION
169 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
172 static_assert(std::is_unsigned<_UIntType>::value,
"template argument "
173 "substituting _UIntType not an unsigned integral type");
174 static_assert(__m == 0u || (__a < __m && __c < __m),
175 "template argument substituting __m out of bounds");
179 static_assert(__m % __a < __m / __a,
180 "sorry, not implemented yet: try a smaller 'a' constant");
192 static constexpr result_type default_seed = 1u;
211 template<
typename _Sseq,
typename =
typename
212 std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value>
225 seed(result_type __s = default_seed);
234 template<
typename _Sseq>
235 typename std::enable_if<std::is_class<_Sseq>::value>::type
244 static constexpr result_type
246 {
return __c == 0u ? 1u : 0u; }
251 static constexpr result_type
261 for (; __z != 0ULL; --__z)
271 _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
289 {
return __lhs._M_x == __rhs._M_x; }
299 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
300 _UIntType1 __m1,
typename _CharT,
typename _Traits>
301 friend std::basic_ostream<_CharT, _Traits>&
302 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
304 __a1, __c1, __m1>& __lcr);
319 template<
typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
320 _UIntType1 __m1,
typename _CharT,
typename _Traits>
321 friend std::basic_istream<_CharT, _Traits>&
322 operator>>(std::basic_istream<_CharT, _Traits>& __is,
341 template<
typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
347 {
return !(__lhs == __rhs); }
378 template<
typename _UIntType,
size_t __w,
379 size_t __n,
size_t __m,
size_t __r,
380 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
381 _UIntType __b,
size_t __t,
382 _UIntType __c,
size_t __l, _UIntType __f>
385 static_assert(std::is_unsigned<_UIntType>::value,
"template argument "
386 "substituting _UIntType not an unsigned integral type");
387 static_assert(1u <= __m && __m <= __n,
388 "template argument substituting __m out of bounds");
389 static_assert(__r <= __w,
"template argument substituting "
391 static_assert(__u <= __w,
"template argument substituting "
393 static_assert(__s <= __w,
"template argument substituting "
395 static_assert(__t <= __w,
"template argument substituting "
397 static_assert(__l <= __w,
"template argument substituting "
399 static_assert(__w <= std::numeric_limits<_UIntType>::digits,
400 "template argument substituting __w out of bound");
401 static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1),
402 "template argument substituting __a out of bound");
403 static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1),
404 "template argument substituting __b out of bound");
405 static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1),
406 "template argument substituting __c out of bound");
407 static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1),
408 "template argument substituting __d out of bound");
409 static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1),
410 "template argument substituting __f out of bound");
417 static constexpr
size_t word_size = __w;
418 static constexpr
size_t state_size = __n;
419 static constexpr
size_t shift_size = __m;
420 static constexpr
size_t mask_bits = __r;
421 static constexpr result_type xor_mask = __a;
422 static constexpr
size_t tempering_u = __u;
423 static constexpr result_type tempering_d = __d;
424 static constexpr
size_t tempering_s = __s;
425 static constexpr result_type tempering_b = __b;
426 static constexpr
size_t tempering_t = __t;
427 static constexpr result_type tempering_c = __c;
428 static constexpr
size_t tempering_l = __l;
429 static constexpr result_type initialization_multiplier = __f;
430 static constexpr result_type default_seed = 5489u;
443 template<
typename _Sseq,
typename =
typename
444 std::enable_if<!std::is_same<_Sseq, mersenne_twister_engine>::value>
451 seed(result_type __sd = default_seed);
453 template<
typename _Sseq>
454 typename std::enable_if<std::is_class<_Sseq>::value>::type
460 static constexpr result_type
467 static constexpr result_type
469 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
477 for (; __z != 0ULL; --__z)
499 {
return (
std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x)
500 && __lhs._M_p == __rhs._M_p); }
514 template<
typename _UIntType1,
515 size_t __w1,
size_t __n1,
516 size_t __m1,
size_t __r1,
517 _UIntType1 __a1,
size_t __u1,
518 _UIntType1 __d1,
size_t __s1,
519 _UIntType1 __b1,
size_t __t1,
520 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
521 typename _CharT,
typename _Traits>
522 friend std::basic_ostream<_CharT, _Traits>&
523 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
525 __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
540 template<
typename _UIntType1,
541 size_t __w1,
size_t __n1,
542 size_t __m1,
size_t __r1,
543 _UIntType1 __a1,
size_t __u1,
544 _UIntType1 __d1,
size_t __s1,
545 _UIntType1 __b1,
size_t __t1,
546 _UIntType1 __c1,
size_t __l1, _UIntType1 __f1,
547 typename _CharT,
typename _Traits>
548 friend std::basic_istream<_CharT, _Traits>&
549 operator>>(std::basic_istream<_CharT, _Traits>& __is,
551 __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
555 _UIntType _M_x[state_size];
571 template<
typename _UIntType,
size_t __w,
572 size_t __n,
size_t __m,
size_t __r,
573 _UIntType __a,
size_t __u, _UIntType __d,
size_t __s,
574 _UIntType __b,
size_t __t,
575 _UIntType __c,
size_t __l, _UIntType __f>
578 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
580 __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
581 {
return !(__lhs == __rhs); }
603 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
604 class subtract_with_carry_engine
606 static_assert(std::is_unsigned<_UIntType>::value,
"template argument "
607 "substituting _UIntType not an unsigned integral type");
608 static_assert(0u < __s && __s < __r,
609 "template argument substituting __s out of bounds");
610 static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
611 "template argument substituting __w out of bounds");
615 typedef _UIntType result_type;
618 static constexpr
size_t word_size = __w;
619 static constexpr
size_t short_lag = __s;
620 static constexpr
size_t long_lag = __r;
621 static constexpr result_type default_seed = 19780503u;
628 subtract_with_carry_engine(result_type __sd = default_seed)
637 template<
typename _Sseq,
typename =
typename
638 std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value>
641 subtract_with_carry_engine(_Sseq& __q)
657 seed(result_type __sd = default_seed);
663 template<
typename _Sseq>
664 typename std::enable_if<std::is_class<_Sseq>::value>::type
671 static constexpr result_type
679 static constexpr result_type
681 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
687 discard(
unsigned long long __z)
689 for (; __z != 0ULL; --__z)
712 operator==(
const subtract_with_carry_engine& __lhs,
713 const subtract_with_carry_engine& __rhs)
714 {
return (std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x)
715 && __lhs._M_carry == __rhs._M_carry
716 && __lhs._M_p == __rhs._M_p); }
730 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
731 typename _CharT,
typename _Traits>
732 friend std::basic_ostream<_CharT, _Traits>&
733 operator<<(std::basic_ostream<_CharT, _Traits>&,
734 const std::subtract_with_carry_engine<_UIntType1, __w1,
749 template<
typename _UIntType1,
size_t __w1,
size_t __s1,
size_t __r1,
750 typename _CharT,
typename _Traits>
751 friend std::basic_istream<_CharT, _Traits>&
752 operator>>(std::basic_istream<_CharT, _Traits>&,
753 std::subtract_with_carry_engine<_UIntType1, __w1,
757 _UIntType _M_x[long_lag];
774 template<
typename _UIntType,
size_t __w,
size_t __s,
size_t __r>
776 operator!=(
const std::subtract_with_carry_engine<_UIntType, __w,
778 const std::subtract_with_carry_engine<_UIntType, __w,
780 {
return !(__lhs == __rhs); }
789 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
792 static_assert(1 <= __r && __r <= __p,
793 "template argument substituting __r out of bounds");
797 typedef typename _RandomNumberEngine::result_type
result_type;
800 static constexpr
size_t block_size = __p;
801 static constexpr
size_t used_block = __r;
809 : _M_b(), _M_n(0) { }
819 : _M_b(__rng), _M_n(0) { }
829 : _M_b(
std::
move(__rng)), _M_n(0) { }
839 : _M_b(__s), _M_n(0) { }
846 template<
typename _Sseq,
typename =
typename
847 std::enable_if<!std::is_same<_Sseq, discard_block_engine>::value
848 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
882 template<
typename _Sseq>
894 const _RandomNumberEngine&
901 static constexpr result_type
908 static constexpr result_type
918 for (; __z != 0ULL; --__z)
942 {
return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
955 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
956 typename _CharT,
typename _Traits>
957 friend std::basic_ostream<_CharT, _Traits>&
958 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
973 template<
typename _RandomNumberEngine1,
size_t __p1,
size_t __r1,
974 typename _CharT,
typename _Traits>
975 friend std::basic_istream<_CharT, _Traits>&
976 operator>>(std::basic_istream<_CharT, _Traits>& __is,
981 _RandomNumberEngine _M_b;
996 template<
typename _RandomNumberEngine,
size_t __p,
size_t __r>
1002 {
return !(__lhs == __rhs); }
1009 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1012 static_assert(std::is_unsigned<_UIntType>::value,
"template argument "
1013 "substituting _UIntType not an unsigned integral type");
1014 static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
1015 "template argument substituting __w out of bounds");
1064 template<
typename _Sseq,
typename =
typename
1065 std::enable_if<!std::is_same<_Sseq, independent_bits_engine>::value
1066 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
1094 template<
typename _Sseq>
1103 const _RandomNumberEngine&
1110 static constexpr result_type
1117 static constexpr result_type
1119 {
return __detail::_Shift<_UIntType, __w>::__value - 1; }
1127 for (; __z != 0ULL; --__z)
1152 {
return __lhs._M_b == __rhs._M_b; }
1166 template<
typename _CharT,
typename _Traits>
1167 friend std::basic_istream<_CharT, _Traits>&
1170 __w, _UIntType>& __x)
1177 _RandomNumberEngine _M_b;
1192 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType>
1198 {
return !(__lhs == __rhs); }
1210 template<
typename _RandomNumberEngine,
size_t __w,
typename _UIntType,
1211 typename _CharT,
typename _Traits>
1212 std::basic_ostream<_CharT, _Traits>&
1213 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1215 __w, _UIntType>& __x)
1227 template<
typename _RandomNumberEngine,
size_t __k>
1230 static_assert(1u <= __k,
"template argument substituting "
1231 "__k out of bound");
1235 typedef typename _RandomNumberEngine::result_type
result_type;
1237 static constexpr
size_t table_size = __k;
1246 { _M_initialize(); }
1257 { _M_initialize(); }
1268 { _M_initialize(); }
1279 { _M_initialize(); }
1286 template<
typename _Sseq,
typename =
typename
1287 std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value
1288 && !std::is_same<_Sseq, _RandomNumberEngine>::value>
1293 { _M_initialize(); }
1322 template<
typename _Sseq>
1333 const _RandomNumberEngine&
1340 static constexpr result_type
1347 static constexpr result_type
1357 for (; __z != 0ULL; --__z)
1381 {
return (__lhs._M_b == __rhs._M_b
1382 &&
std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v)
1383 && __lhs._M_y == __rhs._M_y); }
1396 template<
typename _RandomNumberEngine1,
size_t __k1,
1397 typename _CharT,
typename _Traits>
1398 friend std::basic_ostream<_CharT, _Traits>&
1399 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1414 template<
typename _RandomNumberEngine1,
size_t __k1,
1415 typename _CharT,
typename _Traits>
1416 friend std::basic_istream<_CharT, _Traits>&
1417 operator>>(std::basic_istream<_CharT, _Traits>& __is,
1421 void _M_initialize()
1423 for (
size_t __i = 0; __i < __k; ++__i)
1428 _RandomNumberEngine _M_b;
1429 result_type _M_v[__k];
1444 template<
typename _RandomNumberEngine,
size_t __k>
1450 {
return !(__lhs == __rhs); }
1456 typedef linear_congruential_engine<uint_fast32_t, 16807UL, 0UL, 2147483647UL>
1487 0xb5026f5aa96619e9ULL, 29,
1488 0x5555555555555555ULL, 17,
1489 0x71d67fffeda60000ULL, 37,
1490 0xfff7eee000000000ULL, 43,
1493 typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24>
1496 typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
1519 #ifdef _GLIBCXX_USE_RANDOM_TR1
1524 if ((__token !=
"/dev/urandom" && __token !=
"/dev/random")
1525 || !(_M_file = std::fopen(__token.c_str(),
"rb")))
1526 std::__throw_runtime_error(__N(
"random_device::"
1527 "random_device(const std::string&)"));
1531 { std::fclose(_M_file); }
1536 random_device(
const std::string& __token =
"mt19937")
1537 : _M_mt(_M_strtoul(__token)) { }
1540 static unsigned long
1543 unsigned long __ret = 5489UL;
1544 if (__str !=
"mt19937")
1546 const char* __nptr = __str.
c_str();
1548 __ret = std::strtoul(__nptr, &__endptr, 0);
1549 if (*__nptr ==
'\0' || *__endptr !=
'\0')
1550 std::__throw_runtime_error(__N(
"random_device::_M_strtoul"
1551 "(const std::string&)"));
1560 static constexpr result_type
1564 static constexpr result_type
1569 entropy() const noexcept
1575 #ifdef _GLIBCXX_USE_RANDOM_TR1
1577 std::fread(reinterpret_cast<void*>(&__ret),
sizeof(result_type),
1586 random_device(
const random_device&) =
delete;
1587 void operator=(
const random_device&) =
delete;
1591 #ifdef _GLIBCXX_USE_RANDOM_TR1
1617 template<
typename _IntType =
int>
1620 static_assert(std::is_integral<_IntType>::value,
1621 "template argument not an integral type");
1634 : _M_a(__a), _M_b(__b)
1636 _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b);
1649 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
1663 : _M_param(__a, __b)
1681 {
return _M_param.a(); }
1685 {
return _M_param.b(); }
1692 {
return _M_param; }
1700 { _M_param = __param; }
1707 {
return this->a(); }
1714 {
return this->b(); }
1719 template<
typename _UniformRandomNumberGenerator>
1722 {
return this->
operator()(__urng, _M_param); }
1724 template<
typename _UniformRandomNumberGenerator>
1726 operator()(_UniformRandomNumberGenerator& __urng,
1727 const param_type& __p);
1736 {
return __d1._M_param == __d2._M_param; }
1739 param_type _M_param;
1746 template<
typename _IntType>
1750 {
return !(__d1 == __d2); }
1762 template<
typename _IntType,
typename _CharT,
typename _Traits>
1763 std::basic_ostream<_CharT, _Traits>&
1764 operator<<(std::basic_ostream<_CharT, _Traits>&,
1776 template<
typename _IntType,
typename _CharT,
typename _Traits>
1777 std::basic_istream<_CharT, _Traits>&
1778 operator>>(std::basic_istream<_CharT, _Traits>&,
1789 template<
typename _RealType =
double>
1792 static_assert(std::is_floating_point<_RealType>::value,
1793 "template argument not a floating point type");
1805 _RealType __b = _RealType(1))
1806 : _M_a(__a), _M_b(__b)
1808 _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b);
1821 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
1837 _RealType __b = _RealType(1))
1838 : _M_param(__a, __b)
1856 {
return _M_param.a(); }
1860 {
return _M_param.b(); }
1867 {
return _M_param; }
1875 { _M_param = __param; }
1882 {
return this->a(); }
1889 {
return this->b(); }
1894 template<
typename _UniformRandomNumberGenerator>
1897 {
return this->
operator()(__urng, _M_param); }
1899 template<
typename _UniformRandomNumberGenerator>
1901 operator()(_UniformRandomNumberGenerator& __urng,
1902 const param_type& __p)
1904 __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
1906 return (__aurng() * (__p.b() - __p.a())) + __p.a();
1916 {
return __d1._M_param == __d2._M_param; }
1919 param_type _M_param;
1926 template<
typename _IntType>
1930 {
return !(__d1 == __d2); }
1942 template<
typename _RealType,
typename _CharT,
typename _Traits>
1943 std::basic_ostream<_CharT, _Traits>&
1944 operator<<(std::basic_ostream<_CharT, _Traits>&,
1956 template<
typename _RealType,
typename _CharT,
typename _Traits>
1957 std::basic_istream<_CharT, _Traits>&
1958 operator>>(std::basic_istream<_CharT, _Traits>&,
1978 template<
typename _RealType =
double>
1981 static_assert(std::is_floating_point<_RealType>::value,
1982 "template argument not a floating point type");
1994 _RealType __stddev = _RealType(1))
1995 : _M_mean(__mean), _M_stddev(__stddev)
1997 _GLIBCXX_DEBUG_ASSERT(_M_stddev > _RealType(0));
2006 {
return _M_stddev; }
2010 {
return (__p1._M_mean == __p2._M_mean
2011 && __p1._M_stddev == __p2._M_stddev); }
2015 _RealType _M_stddev;
2026 : _M_param(__mean, __stddev), _M_saved_available(false)
2031 : _M_param(__p), _M_saved_available(false)
2039 { _M_saved_available =
false; }
2046 {
return _M_param.mean(); }
2053 {
return _M_param.stddev(); }
2060 {
return _M_param; }
2068 { _M_param = __param; }
2087 template<
typename _UniformRandomNumberGenerator>
2090 {
return this->
operator()(__urng, _M_param); }
2092 template<
typename _UniformRandomNumberGenerator>
2094 operator()(_UniformRandomNumberGenerator& __urng,
2095 const param_type& __p);
2102 template<
typename _RealType1>
2117 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2118 friend std::basic_ostream<_CharT, _Traits>&
2119 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2132 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2133 friend std::basic_istream<_CharT, _Traits>&
2134 operator>>(std::basic_istream<_CharT, _Traits>& __is,
2138 param_type _M_param;
2139 result_type _M_saved;
2140 bool _M_saved_available;
2146 template<
typename _RealType>
2150 {
return !(__d1 == __d2); }
2162 template<
typename _RealType =
double>
2165 static_assert(std::is_floating_point<_RealType>::value,
2166 "template argument not a floating point type");
2178 _RealType __s = _RealType(1))
2179 : _M_m(__m), _M_s(__s)
2192 {
return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; }
2201 _RealType __s = _RealType(1))
2202 : _M_param(__m, __s), _M_nd()
2207 : _M_param(__p), _M_nd()
2222 {
return _M_param.m(); }
2226 {
return _M_param.s(); }
2233 {
return _M_param; }
2241 { _M_param = __param; }
2260 template<
typename _UniformRandomNumberGenerator>
2263 {
return this->
operator()(__urng, _M_param); }
2265 template<
typename _UniformRandomNumberGenerator>
2267 operator()(_UniformRandomNumberGenerator& __urng,
2268 const param_type& __p)
2269 {
return std::exp(__p.s() * _M_nd(__urng) + __p.m()); }
2279 {
return (__d1._M_param == __d2._M_param
2280 && __d1._M_nd == __d2._M_nd); }
2292 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2293 friend std::basic_ostream<_CharT, _Traits>&
2294 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2307 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2308 friend std::basic_istream<_CharT, _Traits>&
2309 operator>>(std::basic_istream<_CharT, _Traits>& __is,
2313 param_type _M_param;
2321 template<
typename _RealType>
2325 {
return !(__d1 == __d2); }
2337 template<
typename _RealType =
double>
2340 static_assert(std::is_floating_point<_RealType>::value,
2341 "template argument not a floating point type");
2353 param_type(_RealType __alpha_val = _RealType(1),
2354 _RealType __beta_val = _RealType(1))
2355 : _M_alpha(__alpha_val), _M_beta(__beta_val)
2357 _GLIBCXX_DEBUG_ASSERT(_M_alpha > _RealType(0));
2363 {
return _M_alpha; }
2370 operator==(
const param_type& __p1,
const param_type& __p2)
2371 {
return (__p1._M_alpha == __p2._M_alpha
2372 && __p1._M_beta == __p2._M_beta); }
2381 _RealType _M_malpha, _M_a2;
2391 _RealType __beta_val = _RealType(1))
2392 : _M_param(__alpha_val, __beta_val), _M_nd()
2397 : _M_param(__p), _M_nd()
2412 {
return _M_param.alpha(); }
2419 {
return _M_param.beta(); }
2426 {
return _M_param; }
2434 { _M_param = __param; }
2453 template<
typename _UniformRandomNumberGenerator>
2456 {
return this->
operator()(__urng, _M_param); }
2458 template<
typename _UniformRandomNumberGenerator>
2460 operator()(_UniformRandomNumberGenerator& __urng,
2461 const param_type& __p);
2471 {
return (__d1._M_param == __d2._M_param
2472 && __d1._M_nd == __d2._M_nd); }
2484 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2485 friend std::basic_ostream<_CharT, _Traits>&
2486 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2498 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2499 friend std::basic_istream<_CharT, _Traits>&
2500 operator>>(std::basic_istream<_CharT, _Traits>& __is,
2504 param_type _M_param;
2512 template<
typename _RealType>
2516 {
return !(__d1 == __d2); }
2525 template<
typename _RealType =
double>
2528 static_assert(std::is_floating_point<_RealType>::value,
2529 "template argument not a floating point type");
2550 {
return __p1._M_n == __p2._M_n; }
2558 : _M_param(__n), _M_gd(__n / 2)
2563 : _M_param(__p), _M_gd(__p.n() / 2)
2578 {
return _M_param.n(); }
2585 {
return _M_param; }
2593 { _M_param = __param; }
2612 template<
typename _UniformRandomNumberGenerator>
2615 {
return 2 * _M_gd(__urng); }
2617 template<
typename _UniformRandomNumberGenerator>
2619 operator()(_UniformRandomNumberGenerator& __urng,
2620 const param_type& __p)
2624 return 2 * _M_gd(__urng, param_type(__p.n() / 2));
2635 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
2647 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2648 friend std::basic_ostream<_CharT, _Traits>&
2649 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2662 template<
typename _RealType1,
typename _CharT,
typename _Traits>
2663 friend std::basic_istream<_CharT, _Traits>&
2664 operator>>(std::basic_istream<_CharT, _Traits>& __is,
2668 param_type _M_param;
2676 template<
typename _RealType>
2680 {
return !(__d1 == __d2); }
2689 template<
typename _RealType =
double>
2692 static_assert(std::is_floating_point<_RealType>::value,
2693 "template argument not a floating point type");
2705 _RealType __b = _RealType(1))
2706 : _M_a(__a), _M_b(__b)
2719 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
2728 _RealType __b = _RealType(1))
2729 : _M_param(__a, __b)
2749 {
return _M_param.a(); }
2753 {
return _M_param.b(); }
2760 {
return _M_param; }
2768 { _M_param = __param; }
2787 template<
typename _UniformRandomNumberGenerator>
2790 {
return this->
operator()(__urng, _M_param); }
2792 template<
typename _UniformRandomNumberGenerator>
2794 operator()(_UniformRandomNumberGenerator& __urng,
2795 const param_type& __p);
2804 {
return __d1._M_param == __d2._M_param; }
2807 param_type _M_param;
2814 template<
typename _RealType>
2818 {
return !(__d1 == __d2); }
2830 template<
typename _RealType,
typename _CharT,
typename _Traits>
2831 std::basic_ostream<_CharT, _Traits>&
2832 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
2845 template<
typename _RealType,
typename _CharT,
typename _Traits>
2846 std::basic_istream<_CharT, _Traits>&
2847 operator>>(std::basic_istream<_CharT, _Traits>& __is,
2861 template<
typename _RealType =
double>
2864 static_assert(std::is_floating_point<_RealType>::value,
2865 "template argument not a floating point type");
2877 _RealType __n = _RealType(1))
2878 : _M_m(__m), _M_n(__n)
2891 {
return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; }
2900 _RealType __n = _RealType(1))
2901 : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2)
2906 : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2)
2924 {
return _M_param.m(); }
2928 {
return _M_param.n(); }
2935 {
return _M_param; }
2943 { _M_param = __param; }
2962 template<
typename _UniformRandomNumberGenerator>
2965 {
return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); }
2967 template<
typename _UniformRandomNumberGenerator>
2969 operator()(_UniformRandomNumberGenerator& __urng,
2970 const param_type& __p)
2974 return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n())
2975 / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m()));
2986 {
return (__d1._M_param == __d2._M_param
2987 && __d1._M_gd_x == __d2._M_gd_x
2988 && __d1._M_gd_y == __d2._M_gd_y); }
3000 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3001 friend std::basic_ostream<_CharT, _Traits>&
3002 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3015 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3016 friend std::basic_istream<_CharT, _Traits>&
3017 operator>>(std::basic_istream<_CharT, _Traits>& __is,
3021 param_type _M_param;
3029 template<
typename _RealType>
3033 {
return !(__d1 == __d2); }
3044 template<
typename _RealType =
double>
3047 static_assert(std::is_floating_point<_RealType>::value,
3048 "template argument not a floating point type");
3059 param_type(_RealType __n = _RealType(1))
3068 operator==(
const param_type& __p1,
const param_type& __p2)
3069 {
return __p1._M_n == __p2._M_n; }
3077 : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2)
3082 : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2)
3100 {
return _M_param.n(); }
3107 {
return _M_param; }
3115 { _M_param = __param; }
3134 template<
typename _UniformRandomNumberGenerator>
3137 {
return _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); }
3139 template<
typename _UniformRandomNumberGenerator>
3141 operator()(_UniformRandomNumberGenerator& __urng,
3142 const param_type& __p)
3147 const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2));
3148 return _M_nd(__urng) * std::sqrt(__p.n() / __g);
3159 {
return (__d1._M_param == __d2._M_param
3160 && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
3172 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3173 friend std::basic_ostream<_CharT, _Traits>&
3174 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3187 template<
typename _RealType1,
typename _CharT,
typename _Traits>
3188 friend std::basic_istream<_CharT, _Traits>&
3189 operator>>(std::basic_istream<_CharT, _Traits>& __is,
3193 param_type _M_param;
3202 template<
typename _RealType>
3206 {
return !(__d1 == __d2); }
3234 param_type(
double __p = 0.5)
3237 _GLIBCXX_DEBUG_ASSERT((_M_p >= 0.0) && (_M_p <= 1.0));
3245 operator==(
const param_type& __p1,
const param_type& __p2)
3246 {
return __p1._M_p == __p2._M_p; }
3282 {
return _M_param.p(); }
3289 {
return _M_param; }
3297 { _M_param = __param; }
3316 template<
typename _UniformRandomNumberGenerator>
3319 {
return this->
operator()(__urng, _M_param); }
3321 template<
typename _UniformRandomNumberGenerator>
3323 operator()(_UniformRandomNumberGenerator& __urng,
3324 const param_type& __p)
3326 __detail::_Adaptor<_UniformRandomNumberGenerator, double>
3328 if ((__aurng() - __aurng.min())
3329 < __p.p() * (__aurng.max() - __aurng.min()))
3341 {
return __d1._M_param == __d2._M_param; }
3344 param_type _M_param;
3354 {
return !(__d1 == __d2); }
3366 template<
typename _CharT,
typename _Traits>
3367 std::basic_ostream<_CharT, _Traits>&
3368 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3380 template<
typename _CharT,
typename _Traits>
3381 std::basic_istream<_CharT, _Traits>&
3399 template<
typename _IntType =
int>
3402 static_assert(std::is_integral<_IntType>::value,
3403 "template argument not an integral type");
3415 param_type(_IntType __t = _IntType(1),
double __p = 0.5)
3416 : _M_t(__t), _M_p(__p)
3418 _GLIBCXX_DEBUG_ASSERT((_M_t >= _IntType(0))
3433 operator==(
const param_type& __p1,
const param_type& __p2)
3434 {
return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; }
3444 #if _GLIBCXX_USE_C99_MATH_TR1
3445 double _M_d1, _M_d2, _M_s1, _M_s2, _M_c,
3446 _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p;
3455 : _M_param(__t, __p), _M_nd()
3460 : _M_param(__p), _M_nd()
3475 {
return _M_param.t(); }
3482 {
return _M_param.p(); }
3489 {
return _M_param; }
3497 { _M_param = __param; }
3511 {
return _M_param.t(); }
3516 template<
typename _UniformRandomNumberGenerator>
3519 {
return this->
operator()(__urng, _M_param); }
3521 template<
typename _UniformRandomNumberGenerator>
3523 operator()(_UniformRandomNumberGenerator& __urng,
3524 const param_type& __p);
3534 #ifdef _GLIBCXX_USE_C99_MATH_TR1
3535 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
3537 {
return __d1._M_param == __d2._M_param; }
3550 template<
typename _IntType1,
3551 typename _CharT,
typename _Traits>
3552 friend std::basic_ostream<_CharT, _Traits>&
3553 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3566 template<
typename _IntType1,
3567 typename _CharT,
typename _Traits>
3568 friend std::basic_istream<_CharT, _Traits>&
3569 operator>>(std::basic_istream<_CharT, _Traits>& __is,
3573 template<
typename _UniformRandomNumberGenerator>
3575 _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t);
3577 param_type _M_param;
3586 template<
typename _IntType>
3590 {
return !(__d1 == __d2); }
3600 template<
typename _IntType =
int>
3603 static_assert(std::is_integral<_IntType>::value,
3604 "template argument not an integral type");
3616 param_type(
double __p = 0.5)
3619 _GLIBCXX_DEBUG_ASSERT((_M_p > 0.0) && (_M_p < 1.0));
3628 operator==(
const param_type& __p1,
const param_type& __p2)
3629 {
return __p1._M_p == __p2._M_p; }
3634 { _M_log_1_p = std::log(1.0 - _M_p); }
3665 {
return _M_param.p(); }
3672 {
return _M_param; }
3680 { _M_param = __param; }
3699 template<
typename _UniformRandomNumberGenerator>
3702 {
return this->
operator()(__urng, _M_param); }
3704 template<
typename _UniformRandomNumberGenerator>
3706 operator()(_UniformRandomNumberGenerator& __urng,
3707 const param_type& __p);
3716 {
return __d1._M_param == __d2._M_param; }
3719 param_type _M_param;
3726 template<
typename _IntType>
3730 {
return !(__d1 == __d2); }
3742 template<
typename _IntType,
3743 typename _CharT,
typename _Traits>
3744 std::basic_ostream<_CharT, _Traits>&
3745 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3757 template<
typename _IntType,
3758 typename _CharT,
typename _Traits>
3759 std::basic_istream<_CharT, _Traits>&
3760 operator>>(std::basic_istream<_CharT, _Traits>& __is,
3771 template<
typename _IntType =
int>
3774 static_assert(std::is_integral<_IntType>::value,
3775 "template argument not an integral type");
3786 param_type(_IntType __k = 1,
double __p = 0.5)
3787 : _M_k(__k), _M_p(__p)
3789 _GLIBCXX_DEBUG_ASSERT((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0));
3801 operator==(
const param_type& __p1,
const param_type& __p2)
3802 {
return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; }
3811 : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p)
3816 : _M_param(__p), _M_gd(__p.
k(), (1.0 - __p.
p()) / __p.
p())
3831 {
return _M_param.k(); }
3838 {
return _M_param.p(); }
3845 {
return _M_param; }
3853 { _M_param = __param; }
3872 template<
typename _UniformRandomNumberGenerator>
3874 operator()(_UniformRandomNumberGenerator& __urng);
3876 template<
typename _UniformRandomNumberGenerator>
3878 operator()(_UniformRandomNumberGenerator& __urng,
3879 const param_type& __p);
3889 {
return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
3902 template<
typename _IntType1,
typename _CharT,
typename _Traits>
3903 friend std::basic_ostream<_CharT, _Traits>&
3904 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
3917 template<
typename _IntType1,
typename _CharT,
typename _Traits>
3918 friend std::basic_istream<_CharT, _Traits>&
3919 operator>>(std::basic_istream<_CharT, _Traits>& __is,
3923 param_type _M_param;
3931 template<
typename _IntType>
3935 {
return !(__d1 == __d2); }
3953 template<
typename _IntType =
int>
3956 static_assert(std::is_integral<_IntType>::value,
3957 "template argument not an integral type");
3969 param_type(
double __mean = 1.0)
3972 _GLIBCXX_DEBUG_ASSERT(_M_mean > 0.0);
3981 operator==(
const param_type& __p1,
const param_type& __p2)
3982 {
return __p1._M_mean == __p2._M_mean; }
3992 #if _GLIBCXX_USE_C99_MATH_TR1
3993 double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb;
4000 : _M_param(__mean), _M_nd()
4005 : _M_param(__p), _M_nd()
4020 {
return _M_param.mean(); }
4027 {
return _M_param; }
4035 { _M_param = __param; }
4054 template<
typename _UniformRandomNumberGenerator>
4057 {
return this->
operator()(__urng, _M_param); }
4059 template<
typename _UniformRandomNumberGenerator>
4061 operator()(_UniformRandomNumberGenerator& __urng,
4062 const param_type& __p);
4072 #ifdef _GLIBCXX_USE_C99_MATH_TR1
4073 {
return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
4075 {
return __d1._M_param == __d2._M_param; }
4088 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4089 friend std::basic_ostream<_CharT, _Traits>&
4090 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4103 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4104 friend std::basic_istream<_CharT, _Traits>&
4105 operator>>(std::basic_istream<_CharT, _Traits>& __is,
4109 param_type _M_param;
4118 template<
typename _IntType>
4122 {
return !(__d1 == __d2); }
4140 template<
typename _RealType =
double>
4143 static_assert(std::is_floating_point<_RealType>::value,
4144 "template argument not a floating point type");
4155 param_type(_RealType __lambda = _RealType(1))
4156 : _M_lambda(__lambda)
4158 _GLIBCXX_DEBUG_ASSERT(_M_lambda > _RealType(0));
4163 {
return _M_lambda; }
4166 operator==(
const param_type& __p1,
const param_type& __p2)
4167 {
return __p1._M_lambda == __p2._M_lambda; }
4170 _RealType _M_lambda;
4180 : _M_param(__lambda)
4201 {
return _M_param.lambda(); }
4208 {
return _M_param; }
4216 { _M_param = __param; }
4235 template<
typename _UniformRandomNumberGenerator>
4238 {
return this->
operator()(__urng, _M_param); }
4240 template<
typename _UniformRandomNumberGenerator>
4242 operator()(_UniformRandomNumberGenerator& __urng,
4243 const param_type& __p)
4245 __detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
4247 return -std::log(
result_type(1) - __aurng()) / __p.lambda();
4257 {
return __d1._M_param == __d2._M_param; }
4260 param_type _M_param;
4267 template<
typename _RealType>
4271 {
return !(__d1 == __d2); }
4283 template<
typename _RealType,
typename _CharT,
typename _Traits>
4284 std::basic_ostream<_CharT, _Traits>&
4285 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4298 template<
typename _RealType,
typename _CharT,
typename _Traits>
4299 std::basic_istream<_CharT, _Traits>&
4300 operator>>(std::basic_istream<_CharT, _Traits>& __is,
4313 template<
typename _RealType =
double>
4316 static_assert(std::is_floating_point<_RealType>::value,
4317 "template argument not a floating point type");
4328 param_type(_RealType __a = _RealType(1),
4329 _RealType __b = _RealType(1))
4330 : _M_a(__a), _M_b(__b)
4342 operator==(
const param_type& __p1,
const param_type& __p2)
4343 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
4352 _RealType __b = _RealType(1))
4353 : _M_param(__a, __b)
4373 {
return _M_param.a(); }
4380 {
return _M_param.b(); }
4387 {
return _M_param; }
4395 { _M_param = __param; }
4414 template<
typename _UniformRandomNumberGenerator>
4417 {
return this->
operator()(__urng, _M_param); }
4419 template<
typename _UniformRandomNumberGenerator>
4421 operator()(_UniformRandomNumberGenerator& __urng,
4422 const param_type& __p);
4431 {
return __d1._M_param == __d2._M_param; }
4434 param_type _M_param;
4441 template<
typename _RealType>
4445 {
return !(__d1 == __d2); }
4457 template<
typename _RealType,
typename _CharT,
typename _Traits>
4458 std::basic_ostream<_CharT, _Traits>&
4459 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4472 template<
typename _RealType,
typename _CharT,
typename _Traits>
4473 std::basic_istream<_CharT, _Traits>&
4474 operator>>(std::basic_istream<_CharT, _Traits>& __is,
4487 template<
typename _RealType =
double>
4490 static_assert(std::is_floating_point<_RealType>::value,
4491 "template argument not a floating point type");
4502 param_type(_RealType __a = _RealType(0),
4503 _RealType __b = _RealType(1))
4504 : _M_a(__a), _M_b(__b)
4516 operator==(
const param_type& __p1,
const param_type& __p2)
4517 {
return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
4526 _RealType __b = _RealType(1))
4527 : _M_param(__a, __b)
4547 {
return _M_param.a(); }
4554 {
return _M_param.b(); }
4561 {
return _M_param; }
4569 { _M_param = __param; }
4588 template<
typename _UniformRandomNumberGenerator>
4591 {
return this->
operator()(__urng, _M_param); }
4593 template<
typename _UniformRandomNumberGenerator>
4595 operator()(_UniformRandomNumberGenerator& __urng,
4596 const param_type& __p);
4605 {
return __d1._M_param == __d2._M_param; }
4608 param_type _M_param;
4615 template<
typename _RealType>
4619 {
return !(__d1 == __d2); }
4631 template<
typename _RealType,
typename _CharT,
typename _Traits>
4632 std::basic_ostream<_CharT, _Traits>&
4633 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4646 template<
typename _RealType,
typename _CharT,
typename _Traits>
4647 std::basic_istream<_CharT, _Traits>&
4648 operator>>(std::basic_istream<_CharT, _Traits>& __is,
4658 template<
typename _IntType =
int>
4661 static_assert(std::is_integral<_IntType>::value,
4662 "template argument not an integral type");
4674 : _M_prob(), _M_cp()
4677 template<
typename _InputIterator>
4678 param_type(_InputIterator __wbegin,
4679 _InputIterator __wend)
4680 : _M_prob(__wbegin, __wend), _M_cp()
4681 { _M_initialize(); }
4683 param_type(initializer_list<double> __wil)
4684 : _M_prob(__wil.begin(), __wil.end()), _M_cp()
4685 { _M_initialize(); }
4687 template<
typename _Func>
4688 param_type(
size_t __nw,
double __xmin,
double __xmax,
4692 param_type(
const param_type&) =
default;
4693 param_type& operator=(
const param_type&) =
default;
4696 probabilities()
const
4700 operator==(
const param_type& __p1,
const param_type& __p2)
4701 {
return __p1._M_prob == __p2._M_prob; }
4715 template<
typename _InputIterator>
4717 _InputIterator __wend)
4718 : _M_param(__wbegin, __wend)
4721 discrete_distribution(initializer_list<double> __wl)
4725 template<
typename _Func>
4726 discrete_distribution(
size_t __nw,
double __xmin,
double __xmax,
4728 : _M_param(__nw, __xmin, __xmax, __fw)
4732 discrete_distribution(
const param_type& __p)
4749 return _M_param._M_prob.
empty()
4758 {
return _M_param; }
4766 { _M_param = __param; }
4781 return _M_param._M_prob.
empty()
4788 template<
typename _UniformRandomNumberGenerator>
4791 {
return this->
operator()(__urng, _M_param); }
4793 template<
typename _UniformRandomNumberGenerator>
4795 operator()(_UniformRandomNumberGenerator& __urng,
4796 const param_type& __p);
4805 {
return __d1._M_param == __d2._M_param; }
4817 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4818 friend std::basic_ostream<_CharT, _Traits>&
4819 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
4833 template<
typename _IntType1,
typename _CharT,
typename _Traits>
4834 friend std::basic_istream<_CharT, _Traits>&
4835 operator>>(std::basic_istream<_CharT, _Traits>& __is,
4839 param_type _M_param;
4846 template<
typename _IntType>
4850 {
return !(__d1 == __d2); }
4859 template<
typename _RealType =
double>
4862 static_assert(std::is_floating_point<_RealType>::value,
4863 "template argument not a floating point type");
4875 : _M_int(), _M_den(), _M_cp()
4878 template<
typename _InputIteratorB,
typename _InputIteratorW>
4879 param_type(_InputIteratorB __bfirst,
4880 _InputIteratorB __bend,
4881 _InputIteratorW __wbegin);
4883 template<
typename _Func>
4884 param_type(initializer_list<_RealType> __bi, _Func __fw);
4886 template<
typename _Func>
4887 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
4891 param_type(
const param_type&) =
default;
4892 param_type& operator=(
const param_type&) =
default;
4900 __tmp[1] = _RealType(1);
4912 operator==(
const param_type& __p1,
const param_type& __p2)
4913 {
return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
4929 template<
typename _InputIteratorB,
typename _InputIteratorW>
4931 _InputIteratorB __bend,
4932 _InputIteratorW __wbegin)
4933 : _M_param(__bfirst, __bend, __wbegin)
4936 template<
typename _Func>
4937 piecewise_constant_distribution(initializer_list<_RealType> __bl,
4939 : _M_param(__bl, __fw)
4942 template<
typename _Func>
4943 piecewise_constant_distribution(
size_t __nw,
4944 _RealType __xmin, _RealType __xmax,
4946 : _M_param(__nw, __xmin, __xmax, __fw)
4950 piecewise_constant_distribution(
const param_type& __p)
4967 if (_M_param._M_int.
empty())
4970 __tmp[1] = _RealType(1);
4974 return _M_param._M_int;
4983 return _M_param._M_den.
empty()
4992 {
return _M_param; }
5000 { _M_param = __param; }
5008 return _M_param._M_int.
empty()
5018 return _M_param._M_int.
empty()
5025 template<
typename _UniformRandomNumberGenerator>
5028 {
return this->
operator()(__urng, _M_param); }
5030 template<
typename _UniformRandomNumberGenerator>
5032 operator()(_UniformRandomNumberGenerator& __urng,
5033 const param_type& __p);
5042 {
return __d1._M_param == __d2._M_param; }
5055 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5056 friend std::basic_ostream<_CharT, _Traits>&
5057 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5071 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5072 friend std::basic_istream<_CharT, _Traits>&
5073 operator>>(std::basic_istream<_CharT, _Traits>& __is,
5077 param_type _M_param;
5084 template<
typename _RealType>
5088 {
return !(__d1 == __d2); }
5097 template<
typename _RealType =
double>
5100 static_assert(std::is_floating_point<_RealType>::value,
5101 "template argument not a floating point type");
5113 : _M_int(), _M_den(), _M_cp(), _M_m()
5116 template<
typename _InputIteratorB,
typename _InputIteratorW>
5117 param_type(_InputIteratorB __bfirst,
5118 _InputIteratorB __bend,
5119 _InputIteratorW __wbegin);
5121 template<
typename _Func>
5122 param_type(initializer_list<_RealType> __bl, _Func __fw);
5124 template<
typename _Func>
5125 param_type(
size_t __nw, _RealType __xmin, _RealType __xmax,
5129 param_type(
const param_type&) =
default;
5130 param_type& operator=(
const param_type&) =
default;
5138 __tmp[1] = _RealType(1);
5150 operator==(
const param_type& __p1,
const param_type& __p2)
5151 {
return (__p1._M_int == __p2._M_int
5152 && __p1._M_den == __p2._M_den); }
5169 template<
typename _InputIteratorB,
typename _InputIteratorW>
5171 _InputIteratorB __bend,
5172 _InputIteratorW __wbegin)
5173 : _M_param(__bfirst, __bend, __wbegin)
5176 template<
typename _Func>
5177 piecewise_linear_distribution(initializer_list<_RealType> __bl,
5179 : _M_param(__bl, __fw)
5182 template<
typename _Func>
5183 piecewise_linear_distribution(
size_t __nw,
5184 _RealType __xmin, _RealType __xmax,
5186 : _M_param(__nw, __xmin, __xmax, __fw)
5190 piecewise_linear_distribution(
const param_type& __p)
5207 if (_M_param._M_int.
empty())
5210 __tmp[1] = _RealType(1);
5214 return _M_param._M_int;
5224 return _M_param._M_den.
empty()
5233 {
return _M_param; }
5241 { _M_param = __param; }
5249 return _M_param._M_int.
empty()
5259 return _M_param._M_int.
empty()
5266 template<
typename _UniformRandomNumberGenerator>
5269 {
return this->
operator()(__urng, _M_param); }
5271 template<
typename _UniformRandomNumberGenerator>
5273 operator()(_UniformRandomNumberGenerator& __urng,
5274 const param_type& __p);
5283 {
return __d1._M_param == __d2._M_param; }
5296 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5297 friend std::basic_ostream<_CharT, _Traits>&
5298 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
5312 template<
typename _RealType1,
typename _CharT,
typename _Traits>
5313 friend std::basic_istream<_CharT, _Traits>&
5314 operator>>(std::basic_istream<_CharT, _Traits>& __is,
5318 param_type _M_param;
5325 template<
typename _RealType>
5329 {
return !(__d1 == __d2); }
5358 template<
typename _IntType>
5359 seed_seq(std::initializer_list<_IntType> il);
5361 template<
typename _InputIterator>
5362 seed_seq(_InputIterator __begin, _InputIterator __end);
5365 template<
typename _RandomAccessIterator>
5367 generate(_RandomAccessIterator __begin, _RandomAccessIterator __end);
5371 {
return _M_v.
size(); }
5373 template<
typename OutputIterator>
5375 param(OutputIterator __dest)
const
5376 { std::copy(_M_v.
begin(), _M_v.
end(), __dest); }
5387 _GLIBCXX_END_NAMESPACE_VERSION
A student_t_distribution random number distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void reset()
Resets the distribution state.
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...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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 discard_block_engine object with the default seed for the underlying base class generator...
result_type max() const
Returns the inclusive upper bound of the distribution range.
static constexpr result_type increment
void param(const param_type &__param)
Sets 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
param_type param() const
Returns the parameter set of the distribution.
result_type min() const
Returns the greatest lower bound value of the distribution.
discard_block_engine()
Constructs a default discard_block_engine engine.
void seed(_Sseq &__q)
Reseeds the independent_bits_engine object with the given seed sequence.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
uniform_int_distribution(_IntType __a=0, _IntType __b=std::numeric_limits< _IntType >::max())
Constructs a uniform distribution object.
result_type min() const
Returns the greatest lower bound value of the distribution.
A piecewise_constant_distribution random number distribution.
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...
param_type param() const
Returns the parameter set of the distribution.
void reset()
Resets the distribution state.
double p() const
Returns the p parameter of the distribution.
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 inclusive upper bound of the distribution 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.
param_type param() const
Returns the parameter set of the distribution.
iterator end() _GLIBCXX_NOEXCEPT
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
linear_congruential_engine(_Sseq &__q)
Constructs a linear_congruential_engine random number generator engine seeded from the seed sequence ...
gamma_distribution(_RealType __alpha_val=_RealType(1), _RealType __beta_val=_RealType(1))
Constructs a gamma distribution with parameters and .
void seed()
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
independent_bits_engine(_Sseq &__q)
Generator construct a independent_bits_engine engine.
_RealType generate_canonical(_UniformRandomNumberGenerator &__g)
A function template for converting the output of a (integral) uniform random number generator to a fl...
void reset()
Resets the distribution state.
independent_bits_engine(result_type __s)
Seed constructs a independent_bits_engine engine.
const _RandomNumberEngine & base() const noexcept
Gets a const reference to the underlying generator engine object.
size_type size() const _GLIBCXX_NOEXCEPT
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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.
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...
_RealType lambda() const
Returns the inverse scale parameter 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.
result_type max() const
Returns the least upper bound value of the distribution.
shuffle_order_engine(result_type __s)
Seed constructs a shuffle_order_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
A Bernoulli random number distribution.
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.
result_type max() const
Returns the least upper bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
_RealType b() const
Return the parameter 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.
shuffle_order_engine()
Constructs a default shuffle_order_engine engine.
double p() const
Returns the distribution p parameter.
static constexpr result_type multiplier
independent_bits_engine(const _RandomNumberEngine &__rng)
Copy constructs a independent_bits_engine engine.
void param(const param_type &__param)
Sets the parameter set of the distribution.
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 ...
param_type param() const
Returns the parameter set of the distribution.
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...
void discard(unsigned long long __z)
Discard a sequence of random numbers.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
linear_congruential_engine< uint_fast32_t, 48271UL, 0UL, 2147483647UL > minstd_rand
result_type min() const
Returns the greatest lower bound value of the distribution.
independent_bits_engine()
Constructs a default independent_bits_engine engine.
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...
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.
void reset()
Resets the distribution state.
void param(const param_type &__param)
Sets the parameter set of the distribution.
param_type param() const
Returns the parameter set 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.
result_type operator()()
Gets the next random number in the sequence.
friend bool operator==(const cauchy_distribution &__d1, const cauchy_distribution &__d2)
Return true if two Cauchy distributions have the same parameters.
A cauchy_distribution random number distribution.
exponential_distribution(const result_type &__lambda=result_type(1))
Constructs an exponential distribution with inverse scale parameter .
static constexpr result_type min()
Gets the smallest possible value in the output range.
friend bool operator==(const discrete_distribution &__d1, const discrete_distribution &__d2)
Return true if two discrete distributions have the same parameters.
param_type param() const
Returns the parameter set of the distribution.
mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL > mt19937
result_type min() const
Returns the greatest lower bound value of the distribution.
param_type param() const
Returns the parameter set of the distribution.
_RealType alpha() const
Returns the of the distribution.
param_type param() const
Returns the parameter set of the distribution.
_RandomNumberEngine::result_type result_type
param_type param() const
Returns the parameter set of the distribution.
One of the math functors.
static constexpr result_type max()
Gets the largest possible value in the output range.
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...
independent_bits_engine(_RandomNumberEngine &&__rng)
Move constructs a independent_bits_engine engine.
A normal continuous distribution for random numbers.
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...
result_type max() const
Returns the least upper bound value 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...
A fisher_f_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.
std::vector< double > probabilities() const
Returns the probabilities of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void seed(_Sseq &__q)
Reseeds the discard_block_engine object with the given seed sequence.
friend bool operator==(const exponential_distribution &__d1, const exponential_distribution &__d2)
Return true if two exponential distributions have the same parameters.
shuffle_order_engine(const _RandomNumberEngine &__rng)
Copy constructs a shuffle_order_engine engine.
void param(const param_type &__param)
Sets the parameter set 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...
void param(const param_type &__param)
Sets the parameter set of the distribution.
const _CharT * c_str() const _GLIBCXX_NOEXCEPT
Return const pointer to null-terminated contents.
void reset()
Resets the distribution state.
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...
void reset()
Resets the distribution state.
void seed(result_type __s)
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
_RealType a() const
Return the parameter of the distribution.
void seed(_Sseq &__q)
Reseeds the shuffle_order_engine object with the given seed sequence.
double mean() const
Returns the distribution parameter mean.
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 ...
_RandomNumberEngine::result_type result_type
result_type max() const
Returns the least upper bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
param_type param() const
Returns the parameter set of the distribution.
void discard(unsigned long long __z)
Discard a sequence of random numbers.
void reset()
Resets the distribution state.
_RealType stddev() const
Returns the standard deviation of the distribution.
std::vector< _RealType > intervals() const
Return the intervals of the distribution.
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 min() const
Returns the greatest lower bound value of the distribution.
void reset()
Resets the distribution state.
result_type max() const
Returns the least upper bound value of the distribution.
_IntType t() const
Returns the distribution t parameter.
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 ...
discard_block_engine(const _RandomNumberEngine &__rng)
Copy constructs a discard_block_engine engine.
std::vector< double > densities() const
Returns a vector of the probability densities.
void reset()
Resets the distribution state.
A gamma continuous distribution for random numbers.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
static constexpr result_type min()
Gets the smallest possible value in the output range.
normal_distribution(result_type __mean=result_type(0), result_type __stddev=result_type(1))
result_type min() const
Returns the greatest lower bound value of the distribution.
param_type param() const
Returns the parameter set of the distribution.
void reset()
Resets the distribution state.
A negative_binomial_distribution random number distribution.
discard_block_engine(_Sseq &__q)
Generator construct a discard_block_engine engine.
friend std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, std::piecewise_constant_distribution< _RealType1 > &__x)
Extracts a piecewise_constan_distribution random number distribution __x from the input stream __is...
friend bool operator==(const uniform_real_distribution &__d1, const uniform_real_distribution &__d2)
Return true if two uniform real distributions have the same parameters.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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.
Uniform discrete distribution for random numbers. A discrete random distribution on the range with e...
static constexpr result_type min()
void param(const param_type &__param)
Sets the parameter set of the distribution.
shuffle_order_engine(_RandomNumberEngine &&__rng)
Move constructs a shuffle_order_engine engine.
result_type min() const
Returns the greatest lower bound value of the distribution.
std::vector< _RealType > intervals() const
Returns a vector of the intervals.
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.
The seed_seq class generates sequences of seeds for random number generators.
param_type param() const
Returns the parameter set of the distribution.
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...
bool empty() const _GLIBCXX_NOEXCEPT
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
void reset()
Resets the distribution state.
A discrete Poisson random number distribution.
void reset()
Resets the distribution state.
result_type min() const
Returns the greatest lower bound value of the distribution.
friend bool operator==(const shuffle_order_engine &__lhs, const shuffle_order_engine &__rhs)
_RealType mean() const
Returns the mean of the distribution.
friend bool operator==(const geometric_distribution &__d1, const geometric_distribution &__d2)
Return true if two geometric distributions have the same parameters.
bernoulli_distribution(double __p=0.5)
Constructs a Bernoulli distribution with likelihood p.
void param(const param_type &__param)
Sets the parameter set of the distribution.
param_type param() const
Returns the parameter set of the distribution.
ISO C++ entities toplevel namespace is std.
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.
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...
void reset()
Resets the distribution state.
result_type min() const
Returns the greatest lower bound value of the 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...
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...
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 discard(unsigned long long __z)
Discard a sequence of random numbers.
void seed(result_type __s)
Reseeds the independent_bits_engine object with the default seed for the underlying base class genera...
param_type param() const
Returns the parameter set of the distribution.
void seed()
Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator...
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...
A piecewise_linear_distribution random number distribution.
A discrete geometric random number distribution.
double p() const
Return the parameter of the distribution.
param_type param() const
Returns the parameter set of the distribution.
friend bool operator==(const piecewise_constant_distribution &__d1, const piecewise_constant_distribution &__d2)
Return true if two piecewise constant distributions have the same parameters.
const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
friend bool operator==(const weibull_distribution &__d1, const weibull_distribution &__d2)
Return true if two Weibull distributions have the same parameters.
shuffle_order_engine(_Sseq &__q)
Generator construct a shuffle_order_engine engine.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
friend bool operator==(const piecewise_linear_distribution &__d1, const piecewise_linear_distribution &__d2)
Return true if two piecewise linear distributions have the same parameters.
const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
_RealType a() const
Return the parameter of the distribution.
_RealType b() const
Return the parameter of the distribution.
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...
void reset()
Resets the distribution state.
result_type min() const
Returns the inclusive lower bound of the distribution range.
linear_congruential_engine< uint_fast32_t, 16807UL, 0UL, 2147483647UL > minstd_rand0
discard_block_engine(result_type __s)
Seed constructs a discard_block_engine engine.
friend bool operator==(const bernoulli_distribution &__d1, const bernoulli_distribution &__d2)
Return true if two Bernoulli distributions have the same parameters.
result_type min() const
Returns the inclusive lower bound of the distribution range.
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...
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.
_RealType beta() const
Returns the of the distribution.
result_type max() const
Returns the least upper bound value of the distribution.
A lognormal_distribution random number distribution.
Produces random numbers by combining random numbers from some base engine to produce random numbers w...
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.
const _RandomNumberEngine & base() const noexcept
void reset()
Resets the distribution state.
void reset()
Resets the distribution state.
A weibull_distribution random number distribution.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void reset()
Resets the distribution state.
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...
void seed(result_type __s=default_seed)
Reseeds the linear_congruential_engine random number generator engine sequence to the seed __s...
std::vector< double > densities() const
Return a vector of the probability densities 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...
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
static constexpr result_type max()
Gets the largest possible value in the output range.
mersenne_twister_engine(_Sseq &__q)
Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence __q...
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.
A discrete binomial random number distribution.
result_type max() const
Returns the least upper bound value of the distribution.
result_type operator()()
Gets the next value in the generated random number sequence.
A model of a linear congruential random number generator.
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...
discard_block_engine(_RandomNumberEngine &&__rng)
Move constructs a discard_block_engine engine.
friend bool operator==(const uniform_int_distribution &__d1, const uniform_int_distribution &__d2)
Return true if two uniform integer distributions have the same parameters.
result_type min() const
Returns the greatest lower bound value of the distribution.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
_IntType k() const
Return the parameter of the distribution.
double p() const
Returns the distribution parameter p.
result_type max() const
Returns the least upper bound value 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.
void param(const param_type &__param)
Sets the parameter set of the distribution.
void reset()
Resets the distribution state.
static constexpr result_type max()
Gets the maximum value in the generated random number range.
static constexpr result_type min()
Gets the minimum value in the generated random number range.
bool equal(_II1 __first1, _II1 __last1, _II2 __first2)
Tests a range for element-wise equality.
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...
param_type param() const
Returns the parameter set of the distribution.
A discrete_distribution random number distribution.
A extreme_value_distribution random number distribution.
static constexpr result_type max()
result_type max() const
Returns the least upper bound value of the distribution.
result_type operator()(_UniformRandomNumberGenerator &__urng)
Generating functions.
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...
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.
An exponential continuous distribution for random numbers.
basic_istream< _CharT, _Traits > & operator>>(basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str)
Read stream into a string.
void discard(unsigned long long __z)
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.
uint_least32_t result_type
A chi_squared_distribution random number 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 param(const param_type &__param)
Sets the parameter set of the distribution.
uniform_real_distribution(_RealType __a=_RealType(0), _RealType __b=_RealType(1))
Constructs a uniform_real_distribution object.
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...
iterator begin() _GLIBCXX_NOEXCEPT
Uniform continuous distribution for random numbers.