re PR libstdc++/54675 (Many libstdc++ testsuite failures in ext/random)
PR libstdc++/54675 * include/ext/random: Avoid the badname __alpha (and, for consistency, __mu, __nu, __sigma and __omega too). * include/bits/random.tcc: Likewise. From-SVN: r191650
This commit is contained in:
parent
99c25a87c6
commit
37f1d5c9f9
|
@ -1,3 +1,10 @@
|
|||
2012-09-23 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR libstdc++/54675
|
||||
* include/ext/random: Avoid the badname __alpha (and, for
|
||||
consistency, __mu, __nu, __sigma and __omega too).
|
||||
* include/bits/random.tcc: Likewise.
|
||||
|
||||
2012-09-21 Edward Smith-Rowland <3dw4rd@verizon.net>
|
||||
|
||||
* include/ext/random: Add __gnu_cxx::pareto_distribution<> class.
|
||||
|
|
|
@ -932,9 +932,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
typedef rice_distribution<result_type> distribution_type;
|
||||
|
||||
param_type(result_type __nu = result_type(0),
|
||||
result_type __sigma = result_type(1))
|
||||
: _M_nu(__nu), _M_sigma(__sigma)
|
||||
param_type(result_type __nu_val = result_type(0),
|
||||
result_type __sigma_val = result_type(1))
|
||||
: _M_nu(__nu_val), _M_sigma(__sigma_val)
|
||||
{
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_nu >= result_type(0));
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_sigma > result_type(0));
|
||||
|
@ -964,11 +964,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
* @brief Constructors.
|
||||
*/
|
||||
explicit
|
||||
rice_distribution(result_type __nu = result_type(0),
|
||||
result_type __sigma = result_type(1))
|
||||
: _M_param(__nu, __sigma),
|
||||
_M_ndx(__nu, __sigma),
|
||||
_M_ndy(result_type(0), __sigma)
|
||||
rice_distribution(result_type __nu_val = result_type(0),
|
||||
result_type __sigma_val = result_type(1))
|
||||
: _M_param(__nu_val, __sigma_val),
|
||||
_M_ndx(__nu_val, __sigma_val),
|
||||
_M_ndy(result_type(0), __sigma_val)
|
||||
{ }
|
||||
|
||||
explicit
|
||||
|
@ -1166,9 +1166,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
typedef nakagami_distribution<result_type> distribution_type;
|
||||
|
||||
param_type(result_type __mu = result_type(1),
|
||||
result_type __omega = result_type(1))
|
||||
: _M_mu(__mu), _M_omega(__omega)
|
||||
param_type(result_type __mu_val = result_type(1),
|
||||
result_type __omega_val = result_type(1))
|
||||
: _M_mu(__mu_val), _M_omega(__omega_val)
|
||||
{
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_mu >= result_type(0.5L));
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_omega > result_type(0));
|
||||
|
@ -1198,10 +1198,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
* @brief Constructors.
|
||||
*/
|
||||
explicit
|
||||
nakagami_distribution(result_type __mu = result_type(1),
|
||||
result_type __omega = result_type(1))
|
||||
: _M_param(__mu, __omega),
|
||||
_M_gd(__mu, __omega / __mu)
|
||||
nakagami_distribution(result_type __mu_val = result_type(1),
|
||||
result_type __omega_val = result_type(1))
|
||||
: _M_param(__mu_val, __omega_val),
|
||||
_M_gd(__mu_val, __omega_val / __mu_val)
|
||||
{ }
|
||||
|
||||
explicit
|
||||
|
@ -1399,9 +1399,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
typedef pareto_distribution<result_type> distribution_type;
|
||||
|
||||
param_type(result_type __alpha = result_type(1),
|
||||
result_type __mu = result_type(1))
|
||||
: _M_alpha(__alpha), _M_mu(__mu)
|
||||
param_type(result_type __alpha_val = result_type(1),
|
||||
result_type __mu_val = result_type(1))
|
||||
: _M_alpha(__alpha_val), _M_mu(__mu_val)
|
||||
{
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_alpha > result_type(0));
|
||||
_GLIBCXX_DEBUG_ASSERT(_M_mu > result_type(0));
|
||||
|
@ -1430,9 +1430,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
* @brief Constructors.
|
||||
*/
|
||||
explicit
|
||||
pareto_distribution(result_type __alpha = result_type(1),
|
||||
result_type __mu = result_type(1))
|
||||
: _M_param(__alpha, __mu),
|
||||
pareto_distribution(result_type __alpha_val = result_type(1),
|
||||
result_type __mu_val = result_type(1))
|
||||
: _M_param(__alpha_val, __mu_val),
|
||||
_M_ud()
|
||||
{ }
|
||||
|
||||
|
|
|
@ -773,12 +773,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
const typename __ios_base::fmtflags __flags = __is.flags();
|
||||
__is.flags(__ios_base::dec | __ios_base::skipws);
|
||||
|
||||
_RealType __nu, __sigma;
|
||||
__is >> __nu >> __sigma;
|
||||
_RealType __nu_val, __sigma_val;
|
||||
__is >> __nu_val >> __sigma_val;
|
||||
__is >> __x._M_ndx;
|
||||
__is >> __x._M_ndy;
|
||||
__x.param(typename rice_distribution<_RealType>::
|
||||
param_type(__nu, __sigma));
|
||||
param_type(__nu_val, __sigma_val));
|
||||
|
||||
__is.flags(__flags);
|
||||
return __is;
|
||||
|
@ -838,11 +838,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
const typename __ios_base::fmtflags __flags = __is.flags();
|
||||
__is.flags(__ios_base::dec | __ios_base::skipws);
|
||||
|
||||
_RealType __mu, __omega;
|
||||
__is >> __mu >> __omega;
|
||||
_RealType __mu_val, __omega_val;
|
||||
__is >> __mu_val >> __omega_val;
|
||||
__is >> __x._M_gd;
|
||||
__x.param(typename nakagami_distribution<_RealType>::
|
||||
param_type(__mu, __omega));
|
||||
param_type(__mu_val, __omega_val));
|
||||
|
||||
__is.flags(__flags);
|
||||
return __is;
|
||||
|
@ -860,10 +860,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>)
|
||||
|
||||
result_type __mu = __p.mu();
|
||||
result_type __mu_val = __p.mu();
|
||||
result_type __malphinv = -result_type(1) / __p.alpha();
|
||||
while (__f != __t)
|
||||
*__f++ = __mu * std::pow(this->_M_ud(__urng), __malphinv);
|
||||
*__f++ = __mu_val * std::pow(this->_M_ud(__urng), __malphinv);
|
||||
}
|
||||
|
||||
template<typename _RealType, typename _CharT, typename _Traits>
|
||||
|
@ -902,11 +902,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
const typename __ios_base::fmtflags __flags = __is.flags();
|
||||
__is.flags(__ios_base::dec | __ios_base::skipws);
|
||||
|
||||
_RealType __alpha, __mu;
|
||||
__is >> __alpha >> __mu;
|
||||
_RealType __alpha_val, __mu_val;
|
||||
__is >> __alpha_val >> __mu_val;
|
||||
__is >> __x._M_ud;
|
||||
__x.param(typename pareto_distribution<_RealType>::
|
||||
param_type(__alpha, __mu));
|
||||
param_type(__alpha_val, __mu_val));
|
||||
|
||||
__is.flags(__flags);
|
||||
return __is;
|
||||
|
|
Loading…
Reference in New Issue