random.h (operator==): Mark all inline.

2009-04-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (operator==): Mark all inline.
	(mersenne_twister_engine): Enable #if 0 checks.

	* include/bits/random.h: Formatting tweaks.

From-SVN: r145602
This commit is contained in:
Paolo Carlini 2009-04-06 13:31:12 +00:00 committed by Paolo Carlini
parent 2e698f677d
commit 94986f6d35
2 changed files with 195 additions and 188 deletions

View File

@ -1,3 +1,10 @@
2009-04-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.h (operator==): Mark all inline.
(mersenne_twister_engine): Enable #if 0 checks.
* include/bits/random.h: Formatting tweaks.
2009-04-05 Paolo Carlini <paolo.carlini@oracle.com> 2009-04-05 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc (piecewise_linear_distribution<>:: * include/bits/random.tcc (piecewise_linear_distribution<>::

View File

@ -319,9 +319,9 @@ namespace std
_UIntType1 __m1, _UIntType1 __m1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const linear_congruential_engine<_UIntType1, __a1, __c1, const std::linear_congruential_engine<_UIntType1,
__m1>& __lcr); __a1, __c1, __m1>&);
/** /**
* @brief Sets the state of the engine by reading its textual * @brief Sets the state of the engine by reading its textual
@ -340,9 +340,9 @@ namespace std
_UIntType1 __m1, _UIntType1 __m1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
linear_congruential_engine<_UIntType1, std::linear_congruential_engine<_UIntType1, __a1,
__a1, __c1, __m1>& __lcr); __c1, __m1>&);
private: private:
template<typename _Gen> template<typename _Gen>
@ -406,18 +406,15 @@ namespace std
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
static_assert(__w >= __l, static_assert(__w >= __l,
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
static_assert(__w <= static_cast<size_t>(numeric_limits<_UIntType>::digits), static_assert(__w <=
static_cast<size_t>(numeric_limits<_UIntType>::digits),
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
#if 0
// XXX
static_assert(__a <= __detail::_ShiftMin1<_UIntType, __w>::__value, static_assert(__a <= __detail::_ShiftMin1<_UIntType, __w>::__value,
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
static_assert(__b <= __detail::_ShiftMin1<_UIntType, __w>::__value, static_assert(__b <= __detail::_ShiftMin1<_UIntType, __w>::__value,
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
static_assert(__c <= __detail::_ShiftMin1<_UIntType, __w>::__value, static_assert(__c <= __detail::_ShiftMin1<_UIntType, __w>::__value,
"mersenne_twister_engine template arguments out of bounds"); "mersenne_twister_engine template arguments out of bounds");
#endif
public: public:
/** The type of the generated random value. */ /** The type of the generated random value. */
@ -530,9 +527,10 @@ namespace std
_UIntType1 __c1, size_t __l1, _UIntType1 __f1, _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, __r1, const std::mersenne_twister_engine<_UIntType1, __w1, __n1,
__a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1>& __x); __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
__l1, __f1>&);
/** /**
* @brief Extracts the current state of a % mersenne_twister_engine * @brief Extracts the current state of a % mersenne_twister_engine
@ -555,9 +553,10 @@ namespace std
_UIntType1 __c1, size_t __l1, _UIntType1 __f1, _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, __r1, std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1,
__a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1>& __x); __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
__l1, __f1>&);
private: private:
template<typename _Gen> template<typename _Gen>
@ -719,9 +718,9 @@ namespace std
template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1, template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const subtract_with_carry_engine<_UIntType1, __w1, __s1, const std::subtract_with_carry_engine<_UIntType1, __w1,
__r1>& __x); __s1, __r1>&);
/** /**
* @brief Extracts the current state of a % subtract_with_carry_engine * @brief Extracts the current state of a % subtract_with_carry_engine
@ -737,8 +736,9 @@ namespace std
template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1, template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
subtract_with_carry_engine<_UIntType1, __w1, __s1, __r1>& __x); std::subtract_with_carry_engine<_UIntType1, __w1,
__s1, __r1>&);
private: private:
template<typename _Gen> template<typename _Gen>
@ -934,9 +934,9 @@ namespace std
template<typename _RandomNumberEngine1, size_t __p1, size_t __r1, template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const discard_block_engine<_RandomNumberEngine1, const std::discard_block_engine<_RandomNumberEngine1,
__p1, __r1>& __x); __p1, __r1>&);
/** /**
* @brief Extracts the current state of a % subtract_with_carry_engine * @brief Extracts the current state of a % subtract_with_carry_engine
@ -952,9 +952,9 @@ namespace std
template<typename _RandomNumberEngine1, size_t __p1, size_t __r1, template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
discard_block_engine<_RandomNumberEngine1, std::discard_block_engine<_RandomNumberEngine1,
__p1, __r1>& __x); __p1, __r1>&);
private: private:
_RandomNumberEngine _M_b; _RandomNumberEngine _M_b;
@ -969,9 +969,10 @@ namespace std
class independent_bits_engine class independent_bits_engine
{ {
static_assert(__w > 0U static_assert(__w > 0U
&& __w <= static_cast<size_t>(numeric_limits<_UIntType>::digits), && __w <=
"template arguments out of bounds" static_cast<size_t>(numeric_limits<_UIntType>::digits),
" in independent_bits_engine"); "template arguments out of bounds "
"in independent_bits_engine");
public: public:
/** The type of the generated random value. */ /** The type of the generated random value. */
@ -1125,7 +1126,7 @@ namespace std
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>& __is,
independent_bits_engine<_RandomNumberEngine, std::independent_bits_engine<_RandomNumberEngine,
__w, _UIntType>& __x) __w, _UIntType>& __x)
{ {
__is >> __x._M_b; __is >> __x._M_b;
@ -1150,7 +1151,7 @@ namespace std
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>& __os,
const independent_bits_engine<_RandomNumberEngine, const std::independent_bits_engine<_RandomNumberEngine,
__w, _UIntType>& __x) __w, _UIntType>& __x)
{ {
__os << __x.base(); __os << __x.base();
@ -1228,8 +1229,8 @@ namespace std
{ _M_initialize(); } { _M_initialize(); }
/** /**
* @brief Reseeds the %shuffle_order_engine object with the default seed for * @brief Reseeds the %shuffle_order_engine object with the default seed
* the underlying base class generator engine. for the underlying base class generator engine.
*/ */
void void
seed() seed()
@ -1333,9 +1334,9 @@ namespace std
template<typename _RandomNumberEngine1, size_t __k1, template<typename _RandomNumberEngine1, size_t __k1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const shuffle_order_engine<_RandomNumberEngine1, const std::shuffle_order_engine<_RandomNumberEngine1,
__k1>& __x); __k1>&);
/** /**
* @brief Extracts the current state of a % subtract_with_carry_engine * @brief Extracts the current state of a % subtract_with_carry_engine
@ -1351,9 +1352,8 @@ namespace std
template<typename _RandomNumberEngine1, size_t __k1, template<typename _RandomNumberEngine1, size_t __k1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
shuffle_order_engine<_RandomNumberEngine1, std::shuffle_order_engine<_RandomNumberEngine1, __k1>&);
__k1>& __x);
private: private:
void _M_initialize() void _M_initialize()
@ -1691,9 +1691,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _IntType> template<typename _IntType>
bool inline bool
operator==(const uniform_int_distribution<_IntType>& __d1, operator==(const std::uniform_int_distribution<_IntType>& __d1,
const uniform_int_distribution<_IntType>& __d2) const std::uniform_int_distribution<_IntType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -1708,8 +1708,8 @@ namespace std
*/ */
template<typename _IntType, typename _CharT, typename _Traits> template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const uniform_int_distribution<_IntType>& __x); const std::uniform_int_distribution<_IntType>&);
/** /**
* @brief Extracts a %uniform_int_distribution random number distribution * @brief Extracts a %uniform_int_distribution random number distribution
@ -1722,8 +1722,8 @@ namespace std
*/ */
template<typename _IntType, typename _CharT, typename _Traits> template<typename _IntType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
uniform_int_distribution<_IntType>& __x); std::uniform_int_distribution<_IntType>&);
/** /**
@ -1860,9 +1860,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _IntType> template<typename _IntType>
bool inline bool
operator==(const uniform_real_distribution<_IntType>& __d1, operator==(const std::uniform_real_distribution<_IntType>& __d1,
const uniform_real_distribution<_IntType>& __d2) const std::uniform_real_distribution<_IntType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -1877,8 +1877,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const uniform_real_distribution<_RealType>& __x); const std::uniform_real_distribution<_RealType>&);
/** /**
* @brief Extracts a %uniform_real_distribution random number distribution * @brief Extracts a %uniform_real_distribution random number distribution
@ -1891,8 +1891,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
uniform_real_distribution<_RealType>& __x); std::uniform_real_distribution<_RealType>&);
/* @} */ // group std_random_distributions_uniform /* @} */ // group std_random_distributions_uniform
@ -2028,8 +2028,8 @@ namespace std
*/ */
template<typename _RealType1> template<typename _RealType1>
friend bool friend bool
operator==(const normal_distribution<_RealType1>& __d1, operator==(const std::normal_distribution<_RealType1>& __d1,
const normal_distribution<_RealType1>& __d2); const std::normal_distribution<_RealType1>& __d2);
/** /**
* @brief Inserts a %normal_distribution random number distribution * @brief Inserts a %normal_distribution random number distribution
@ -2043,8 +2043,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const normal_distribution<_RealType1>& __x); const std::normal_distribution<_RealType1>&);
/** /**
* @brief Extracts a %normal_distribution random number distribution * @brief Extracts a %normal_distribution random number distribution
@ -2058,8 +2058,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
normal_distribution<_RealType1>& __x); std::normal_distribution<_RealType1>&);
private: private:
param_type _M_param; param_type _M_param;
@ -2186,9 +2186,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const lognormal_distribution<_RealType>& __d1, operator==(const std::lognormal_distribution<_RealType>& __d1,
const lognormal_distribution<_RealType>& __d2) const std::lognormal_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2203,8 +2203,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const lognormal_distribution<_RealType>& __x); const std::lognormal_distribution<_RealType>&);
/** /**
* @brief Extracts a %lognormal_distribution random number distribution * @brief Extracts a %lognormal_distribution random number distribution
@ -2218,8 +2218,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
lognormal_distribution<_RealType>& __x); std::lognormal_distribution<_RealType>&);
/** /**
@ -2328,9 +2328,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const chi_squared_distribution<_RealType>& __d1, operator==(const std::chi_squared_distribution<_RealType>& __d1,
const chi_squared_distribution<_RealType>& __d2) const std::chi_squared_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2345,8 +2345,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const chi_squared_distribution<_RealType>& __x); const std::chi_squared_distribution<_RealType>&);
/** /**
* @brief Extracts a %chi_squared_distribution random number distribution * @brief Extracts a %chi_squared_distribution random number distribution
@ -2360,8 +2360,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
chi_squared_distribution<_RealType>& __x); std::chi_squared_distribution<_RealType>&);
/** /**
@ -2481,9 +2481,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const cauchy_distribution<_RealType>& __d1, operator==(const std::cauchy_distribution<_RealType>& __d1,
const cauchy_distribution<_RealType>& __d2) const std::cauchy_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2498,8 +2498,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const cauchy_distribution<_RealType>& __x); const std::cauchy_distribution<_RealType>&);
/** /**
* @brief Extracts a %cauchy_distribution random number distribution * @brief Extracts a %cauchy_distribution random number distribution
@ -2513,8 +2513,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
cauchy_distribution<_RealType>& __x); std::cauchy_distribution<_RealType>&);
/** /**
@ -2636,9 +2636,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const fisher_f_distribution<_RealType>& __d1, operator==(const std::fisher_f_distribution<_RealType>& __d1,
const fisher_f_distribution<_RealType>& __d2) const std::fisher_f_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2653,8 +2653,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const fisher_f_distribution<_RealType>& __x); const std::fisher_f_distribution<_RealType>&);
/** /**
* @brief Extracts a %fisher_f_distribution random number distribution * @brief Extracts a %fisher_f_distribution random number distribution
@ -2668,8 +2668,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
fisher_f_distribution<_RealType>& __x); std::fisher_f_distribution<_RealType>&);
/** /**
@ -2784,9 +2784,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const student_t_distribution<_RealType>& __d1, operator==(const std::student_t_distribution<_RealType>& __d1,
const student_t_distribution<_RealType>& __d2) const std::student_t_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2801,8 +2801,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const student_t_distribution<_RealType>& __x); const std::student_t_distribution<_RealType>&);
/** /**
* @brief Extracts a %student_t_distribution random number distribution * @brief Extracts a %student_t_distribution random number distribution
@ -2816,8 +2816,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
student_t_distribution<_RealType>& __x); std::student_t_distribution<_RealType>&);
/* @} */ // group std_random_distributions_normal /* @} */ // group std_random_distributions_normal
@ -2959,9 +2959,9 @@ namespace std
* @brief Return true if two Bernoulli distributions have * @brief Return true if two Bernoulli distributions have
* the same parameters. * the same parameters.
*/ */
bool inline bool
operator==(const bernoulli_distribution& __d1, operator==(const std::bernoulli_distribution& __d1,
const bernoulli_distribution& __d2) const std::bernoulli_distribution& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -2976,8 +2976,8 @@ namespace std
*/ */
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const bernoulli_distribution& __x); const std::bernoulli_distribution&);
/** /**
* @brief Extracts a %bernoulli_distribution random number distribution * @brief Extracts a %bernoulli_distribution random number distribution
@ -2991,7 +2991,7 @@ namespace std
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>& __is,
bernoulli_distribution& __x) std::bernoulli_distribution& __x)
{ {
double __p; double __p;
__is >> __p; __is >> __p;
@ -3026,8 +3026,8 @@ namespace std
: _M_t(__t), _M_p(__p) : _M_t(__t), _M_p(__p)
{ {
_GLIBCXX_DEBUG_ASSERT((_M_t >= _IntType(0)) _GLIBCXX_DEBUG_ASSERT((_M_t >= _IntType(0))
&& (_M_p >= 0.0) && (_M_p >= 0.0)
&& (_M_p <= 1.0)); && (_M_p <= 1.0));
_M_initialize(); _M_initialize();
} }
@ -3126,10 +3126,10 @@ namespace std
*/ */
template<typename _IntType1> template<typename _IntType1>
friend bool friend bool
operator==(const binomial_distribution<_IntType1>& __d1, operator==(const std::binomial_distribution<_IntType1>& __d1,
const binomial_distribution<_IntType1>& __d2) const std::binomial_distribution<_IntType1>& __d2)
{ return (__d1.param() == __d2.param()) { return ((__d1.param() == __d2.param())
&& (__d1._M_nd == __d2._M_nd); } && (__d1._M_nd == __d2._M_nd)); }
template<typename _UniformRandomNumberGenerator> template<typename _UniformRandomNumberGenerator>
result_type result_type
@ -3154,8 +3154,8 @@ namespace std
template<typename _IntType1, template<typename _IntType1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const binomial_distribution<_IntType1>& __x); const std::binomial_distribution<_IntType1>&);
/** /**
* @brief Extracts a %binomial_distribution random number distribution * @brief Extracts a %binomial_distribution random number distribution
@ -3170,8 +3170,8 @@ namespace std
template<typename _IntType1, template<typename _IntType1,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
binomial_distribution<_IntType1>& __x); std::binomial_distribution<_IntType1>&);
private: private:
template<typename _UniformRandomNumberGenerator> template<typename _UniformRandomNumberGenerator>
@ -3307,7 +3307,7 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _IntType> template<typename _IntType>
bool inline bool
operator==(const geometric_distribution<_IntType>& __d1, operator==(const geometric_distribution<_IntType>& __d1,
const geometric_distribution<_IntType>& __d2) const geometric_distribution<_IntType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
@ -3325,8 +3325,8 @@ namespace std
template<typename _IntType, template<typename _IntType,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const geometric_distribution<_IntType>& __x); const std::geometric_distribution<_IntType>&);
/** /**
* @brief Extracts a %geometric_distribution random number distribution * @brief Extracts a %geometric_distribution random number distribution
@ -3340,8 +3340,8 @@ namespace std
template<typename _IntType, template<typename _IntType,
typename _CharT, typename _Traits> typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
geometric_distribution<_IntType>& __x); std::geometric_distribution<_IntType>&);
/** /**
@ -3465,9 +3465,9 @@ namespace std
* the same parameters. * the same parameters.
*/ */
template<typename _IntType> template<typename _IntType>
bool inline bool
operator==(const negative_binomial_distribution<_IntType>& __d1, operator==(const std::negative_binomial_distribution<_IntType>& __d1,
const negative_binomial_distribution<_IntType>& __d2) const std::negative_binomial_distribution<_IntType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -3483,8 +3483,8 @@ namespace std
*/ */
template<typename _IntType, typename _CharT, typename _Traits> template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const negative_binomial_distribution<_IntType>& __x); const std::negative_binomial_distribution<_IntType>&);
/** /**
* @brief Extracts a %negative_binomial_distribution random number * @brief Extracts a %negative_binomial_distribution random number
@ -3498,8 +3498,8 @@ namespace std
*/ */
template<typename _IntType, typename _CharT, typename _Traits> template<typename _IntType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
negative_binomial_distribution<_IntType>& __x); std::negative_binomial_distribution<_IntType>&);
/* @} */ // group std_random_distributions_bernoulli /* @} */ // group std_random_distributions_bernoulli
@ -3629,10 +3629,10 @@ namespace std
*/ */
template<typename _IntType1> template<typename _IntType1>
friend bool friend bool
operator==(const poisson_distribution<_IntType1>& __d1, operator==(const std::poisson_distribution<_IntType1>& __d1,
const poisson_distribution<_IntType1>& __d2) const std::poisson_distribution<_IntType1>& __d2)
{ return (__d1.param() == __d2.param()) { return ((__d1.param() == __d2.param())
&& (__d1._M_nd == __d2._M_nd); } && (__d1._M_nd == __d2._M_nd)); }
/** /**
* @brief Inserts a %poisson_distribution random number distribution * @brief Inserts a %poisson_distribution random number distribution
@ -3646,8 +3646,8 @@ namespace std
*/ */
template<typename _IntType1, typename _CharT, typename _Traits> template<typename _IntType1, typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const poisson_distribution<_IntType1>& __x); const std::poisson_distribution<_IntType1>&);
/** /**
* @brief Extracts a %poisson_distribution random number distribution * @brief Extracts a %poisson_distribution random number distribution
@ -3661,8 +3661,8 @@ namespace std
*/ */
template<typename _IntType1, typename _CharT, typename _Traits> template<typename _IntType1, typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
poisson_distribution<_IntType1>& __x); std::poisson_distribution<_IntType1>&);
private: private:
param_type _M_param; param_type _M_param;
@ -3803,9 +3803,9 @@ namespace std
* parameters. * parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const exponential_distribution<_RealType>& __d1, operator==(const std::exponential_distribution<_RealType>& __d1,
const exponential_distribution<_RealType>& __d2) const std::exponential_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -3820,8 +3820,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const exponential_distribution<_RealType>& __x); const std::exponential_distribution<_RealType>&);
/** /**
* @brief Extracts a %exponential_distribution random number distribution * @brief Extracts a %exponential_distribution random number distribution
@ -3835,8 +3835,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
exponential_distribution<_RealType>& __x); std::exponential_distribution<_RealType>&);
/** /**
@ -3877,8 +3877,8 @@ namespace std
friend bool friend bool
operator==(const param_type& __p1, const param_type& __p2) operator==(const param_type& __p1, const param_type& __p2)
{ return (__p1._M_alpha == __p2._M_alpha) { return ((__p1._M_alpha == __p2._M_alpha)
&& (__p1._M_beta == __p2._M_beta); } && (__p1._M_beta == __p2._M_beta)); }
private: private:
void void
@ -3977,9 +3977,9 @@ namespace std
* parameters. * parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const gamma_distribution<_RealType>& __d1, operator==(const std::gamma_distribution<_RealType>& __d1,
const gamma_distribution<_RealType>& __d2) const std::gamma_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -3994,8 +3994,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const gamma_distribution<_RealType>& __x); const std::gamma_distribution<_RealType>&);
/** /**
* @brief Extracts a %gamma_distribution random number distribution * @brief Extracts a %gamma_distribution random number distribution
@ -4008,8 +4008,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
gamma_distribution<_RealType>& __x); std::gamma_distribution<_RealType>&);
/** /**
@ -4139,9 +4139,9 @@ namespace std
* parameters. * parameters.
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const weibull_distribution<_RealType>& __d1, operator==(const std::weibull_distribution<_RealType>& __d1,
const weibull_distribution<_RealType>& __d2) const std::weibull_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -4156,8 +4156,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const weibull_distribution<_RealType>& __x); const std::weibull_distribution<_RealType>&);
/** /**
* @brief Extracts a %weibull_distribution random number distribution * @brief Extracts a %weibull_distribution random number distribution
@ -4171,8 +4171,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
weibull_distribution<_RealType>& __x); std::weibull_distribution<_RealType>&);
/** /**
@ -4295,9 +4295,9 @@ namespace std
* *
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const extreme_value_distribution<_RealType>& __d1, operator==(const std::extreme_value_distribution<_RealType>& __d1,
const extreme_value_distribution<_RealType>& __d2) const std::extreme_value_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/** /**
@ -4312,8 +4312,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const extreme_value_distribution<_RealType>& __x); const std::extreme_value_distribution<_RealType>&);
/** /**
* @brief Extracts a %extreme_value_distribution random number * @brief Extracts a %extreme_value_distribution random number
@ -4327,8 +4327,8 @@ namespace std
*/ */
template<typename _RealType, typename _CharT, typename _Traits> template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
extreme_value_distribution<_RealType>& __x); std::extreme_value_distribution<_RealType>&);
/** /**
@ -4475,8 +4475,8 @@ namespace std
*/ */
template<typename _IntType1, typename _CharT, typename _Traits> template<typename _IntType1, typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const discrete_distribution<_IntType1>& __x); const std::discrete_distribution<_IntType1>&);
/** /**
* @brief Extracts a %discrete_distribution random number distribution * @brief Extracts a %discrete_distribution random number distribution
@ -4491,8 +4491,8 @@ namespace std
*/ */
template<typename _IntType1, typename _CharT, typename _Traits> template<typename _IntType1, typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
discrete_distribution<_IntType1>& __x); std::discrete_distribution<_IntType1>&);
private: private:
param_type _M_param; param_type _M_param;
@ -4502,9 +4502,9 @@ namespace std
* *
*/ */
template<typename _IntType> template<typename _IntType>
bool inline bool
operator==(const discrete_distribution<_IntType>& __d1, operator==(const std::discrete_distribution<_IntType>& __d1,
const discrete_distribution<_IntType>& __d2) const std::discrete_distribution<_IntType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
@ -4550,8 +4550,8 @@ namespace std
friend bool friend bool
operator==(const param_type& __p1, const param_type& __p2) operator==(const param_type& __p1, const param_type& __p2)
{ return (__p1._M_int == __p2._M_int) { return ((__p1._M_int == __p2._M_int)
&& (__p1._M_den == __p2._M_den); } && (__p1._M_den == __p2._M_den)); }
private: private:
void void
@ -4665,8 +4665,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const piecewise_constant_distribution<_RealType1>& __x); const std::piecewise_constant_distribution<_RealType1>&);
/** /**
* @brief Extracts a %piecewise_constan_distribution random * @brief Extracts a %piecewise_constan_distribution random
@ -4681,8 +4681,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
piecewise_constant_distribution<_RealType1>& __x); std::piecewise_constant_distribution<_RealType1>&);
private: private:
param_type _M_param; param_type _M_param;
@ -4692,9 +4692,9 @@ namespace std
* *
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const piecewise_constant_distribution<_RealType>& __d1, operator==(const std::piecewise_constant_distribution<_RealType>& __d1,
const piecewise_constant_distribution<_RealType>& __d2) const std::piecewise_constant_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
@ -4740,8 +4740,8 @@ namespace std
friend bool friend bool
operator==(const param_type& __p1, const param_type& __p2) operator==(const param_type& __p1, const param_type& __p2)
{ return (__p1._M_int == __p2._M_int) { return ((__p1._M_int == __p2._M_int)
&& (__p1._M_den == __p2._M_den); } && (__p1._M_den == __p2._M_den)); }
private: private:
void void
@ -4857,8 +4857,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>& friend std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os, operator<<(std::basic_ostream<_CharT, _Traits>&,
const piecewise_linear_distribution<_RealType1>& __x); const std::piecewise_linear_distribution<_RealType1>&);
/** /**
* @brief Extracts a %piecewise_linear_distribution random number * @brief Extracts a %piecewise_linear_distribution random number
@ -4873,8 +4873,8 @@ namespace std
*/ */
template<typename _RealType1, typename _CharT, typename _Traits> template<typename _RealType1, typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>& friend std::basic_istream<_CharT, _Traits>&
operator>>(std::basic_istream<_CharT, _Traits>& __is, operator>>(std::basic_istream<_CharT, _Traits>&,
piecewise_linear_distribution<_RealType1>& __x); std::piecewise_linear_distribution<_RealType1>&);
private: private:
param_type _M_param; param_type _M_param;
@ -4884,9 +4884,9 @@ namespace std
* *
*/ */
template<typename _RealType> template<typename _RealType>
bool inline bool
operator==(const piecewise_linear_distribution<_RealType>& __d1, operator==(const std::piecewise_linear_distribution<_RealType>& __d1,
const piecewise_linear_distribution<_RealType>& __d2) const std::piecewise_linear_distribution<_RealType>& __d2)
{ return __d1.param() == __d2.param(); } { return __d1.param() == __d2.param(); }
/* @} */ // group std_random_distributions_poisson /* @} */ // group std_random_distributions_poisson
@ -4937,7 +4937,7 @@ namespace std
private: private:
/// ///
vector<result_type> _M_v; std::vector<result_type> _M_v;
}; };
/* @} */ // group std_random_utilities /* @} */ // group std_random_utilities