Lines Matching refs:__p
2812 template<class _Engine, size_t __p, size_t __r>
2819 static_assert(__r <= __p, "discard_block_engine invalid parameters");
2825 static _LIBCPP_CONSTEXPR const size_t block_size = __p;
2911 template<class _Engine, size_t __p, size_t __r>
2912 _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size;
2914 template<class _Engine, size_t __p, size_t __r>
2915 _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block;
2917 template<class _Engine, size_t __p, size_t __r>
2918 typename discard_block_engine<_Engine, __p, __r>::result_type
2919 discard_block_engine<_Engine, __p, __r>::operator()()
2923 __e_.discard(__p - __r);
3581 const size_t __p = (__n - __t) / 2;
3582 const size_t __q = __p + __t;
3586 result_type __r = 1664525 * _Tp(__first[0] ^ __first[__p]
3588 __first[__p] += __r;
3596 const size_t __kpmodn = (__k + __p) % __n;
3607 const size_t __kpmodn = (__k + __p) % __n;
3618 const size_t __kpmodn = (__k + __p) % __n;
3729 explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {}
3738 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
3749 void param(const param_type& __p) {__p_ = __p;}
3770 uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
3772 return (__p.b() - __p.a())
3774 + __p.a();
3823 explicit param_type(double __p = 0.5) : __p_(__p) {}
3842 explicit bernoulli_distribution(double __p = 0.5)
3843 : __p_(param_type(__p)) {}
3845 explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {}
3854 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
3863 void param(const param_type& __p) {__p_ = __p;}
3883 bernoulli_distribution::operator()(_URNG& __g, const param_type& __p)
3886 return __gen(__g) < __p.p();
3909 double __p;
3910 __is >> __p;
3912 __x.param(param_type(__p));
3935 explicit param_type(result_type __t = 1, double __p = 0.5);
3958 explicit binomial_distribution(result_type __t = 1, double __p = 0.5)
3959 : __p_(param_type(__t, __p)) {}
3961 explicit binomial_distribution(const param_type& __p) : __p_(__p) {}
3970 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
3981 void param(const param_type& __p) {__p_ = __p;}
3999 binomial_distribution<_IntType>::param_type::param_type(result_type __t, double __p)
4000 : __t_(__t), __p_(__p)
4077 double __p;
4078 __is >> __t >> __p;
4080 __x.param(param_type(__t, __p));
4122 explicit exponential_distribution(const param_type& __p) : __p_(__p) {}
4131 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
4140 void param(const param_type& __p) {__p_ = __p;}
4160 exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
4168 / __p.lambda();
4243 explicit normal_distribution(const param_type& __p)
4244 : __p_(__p), _V_hot_(false) {}
4253 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
4264 void param(const param_type& __p) {__p_ = __p;}
4297 normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
4322 return _Up * __p.stddev() + __p.mean();
4421 explicit lognormal_distribution(const param_type& __p)
4422 : __p_(__p) {}
4433 result_type operator()(_URNG& __g, const param_type& __p)
4434 {return _VSTD::exp(const_cast<normal_distribution<result_type>&>(__p.__nd_)(__g));}
4445 void param(const param_type& __p) {__p_ = __p;}
4540 explicit poisson_distribution(const param_type& __p) : __p_(__p) {}
4549 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
4558 void param(const param_type& __p) {__p_ = __p;}
4617 for (double __p = __urd(__urng); __p > __pr.__l_; ++__x)
4618 __p *= __urd(__urng);
4765 explicit weibull_distribution(const param_type& __p)
4766 : __p_(__p) {}
4777 result_type operator()(_URNG& __g, const param_type& __p)
4778 {return __p.b() *
4779 _VSTD::pow(exponential_distribution<result_type>()(__g), 1/__p.a());}
4790 void param(const param_type& __p) {__p_ = __p;}
4879 explicit extreme_value_distribution(const param_type& __p)
4880 : __p_(__p) {}
4889 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
4900 void param(const param_type& __p) {__p_ = __p;}
4920 extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
4922 return __p.a() - __p.b() *
5000 explicit gamma_distribution(const param_type& __p)
5001 : __p_(__p) {}
5010 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5021 void param(const param_type& __p) {__p_ = __p;}
5041 gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
5043 result_type __a = __p.alpha();
5095 return __x * __p.beta();
5147 explicit param_type(result_type __k = 1, double __p = 0.5)
5148 : __k_(__k), __p_(__p) {}
5169 explicit negative_binomial_distribution(result_type __k = 1, double __p = 0.5)
5170 : __p_(__k, __p) {}
5172 explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {}
5181 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5192 void param(const param_type& __p) {__p_ = __p;}
5215 double __p = __pr.p();
5216 if (__k <= 21 * __p)
5218 bernoulli_distribution __gen(__p);
5231 (__k, (1-__p)/__p)(__urng))(__urng);
5258 double __p;
5259 __is >> __k >> __p;
5261 __x.param(param_type(__k, __p));
5281 explicit param_type(double __p = 0.5) : __p_(__p) {}
5300 explicit geometric_distribution(double __p = 0.5) : __p_(__p) {}
5302 explicit geometric_distribution(const param_type& __p) : __p_(__p) {}
5313 result_type operator()(_URNG& __g, const param_type& __p)
5314 {return negative_binomial_distribution<result_type>(1, __p.p())(__g);}
5323 void param(const param_type& __p) {__p_ = __p;}
5360 double __p;
5361 __is >> __p;
5363 __x.param(param_type(__p));
5405 explicit chi_squared_distribution(const param_type& __p)
5406 : __p_(__p) {}
5417 result_type operator()(_URNG& __g, const param_type& __p)
5418 {return gamma_distribution<result_type>(__p.n() / 2, 2)(__g);}
5427 void param(const param_type& __p) {__p_ = __p;}
5515 explicit cauchy_distribution(const param_type& __p)
5516 : __p_(__p) {}
5525 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5536 void param(const param_type& __p) {__p_ = __p;}
5557 cauchy_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
5561 return __p.a() + __p.b() * _VSTD::tan(3.1415926535897932384626433832795 * __gen(__g));
5638 explicit fisher_f_distribution(const param_type& __p)
5639 : __p_(__p) {}
5648 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5659 void param(const param_type& __p) {__p_ = __p;}
5679 fisher_f_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
5681 gamma_distribution<result_type> __gdm(__p.m() * result_type(.5));
5682 gamma_distribution<result_type> __gdn(__p.n() * result_type(.5));
5683 return __p.n() * __gdm(__g) / (__p.m() * __gdn(__g));
5757 explicit student_t_distribution(const param_type& __p)
5758 : __p_(__p) {}
5767 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5776 void param(const param_type& __p) {__p_ = __p;}
5796 student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
5798 gamma_distribution<result_type> __gd(__p.n() * .5, 2);
5799 return __nd_(__g) * _VSTD::sqrt(__p.n()/__gd(__g));
5910 explicit discrete_distribution(const param_type& __p)
5911 : __p_(__p) {}
5920 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
5929 void param(const param_type& __p) {__p_ = __p;}
6005 _VSTD::vector<double> __p(__n+1);
6006 _VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin());
6008 __p[__n] = 1 - __p_[__n-1];
6010 __p[0] = 1;
6011 return __p;
6017 discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
6021 _VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
6022 __p.__p_.begin());
6051 vector<double> __p(__n);
6053 __is >> __p[__i];
6055 swap(__x.__p_.__p_, __p);
6148 explicit piecewise_constant_distribution(const param_type& __p)
6149 : __p_(__p) {}
6159 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
6170 void param(const param_type& __p) {__p_ = __p;}
6317 piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
6321 ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
6322 __u) - __p.__areas_.begin() - 1;
6323 return (__u - __p.__areas_[__k]) / __p.__densities_[__k] + __p.__b_[__k];
6471 explicit piecewise_linear_distribution(const param_type& __p)
6472 : __p_(__p) {}
6482 template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
6493 void param(const param_type& __p) {__p_ = __p;}
6645 piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
6649 ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
6650 __u) - __p.__areas_.begin() - 1;
6651 __u -= __p.__areas_[__k];
6652 const result_type __dk = __p.__densities_[__k];
6653 const result_type __dk1 = __p.__densities_[__k+1];
6655 const result_type __bk = __p.__b_[__k];
6658 const result_type __bk1 = __p.__b_[__k+1];