10 #if !defined(EXRANDOM_UNIT_NORMAL_DISTRIBUTION_HPP) 11 #define EXRANDOM_UNIT_NORMAL_DISTRIBUTION_HPP 1 21 #define EXRANDOM_USE_KAHN 0 60 template<
typename RealType =
double>
114 {
return std::numeric_limits<result_type>::lowest(); }
126 template<
typename Generator>
128 {
return _normal_dist.template value<result_type>(g); }
135 template<
typename Generator>
184 static_assert(!std::numeric_limits<RealType>::is_integer,
185 "template argument not a floating point type");
187 #if EXRANDOM_USE_KAHN 188 static const uint_t _base = std::numeric_limits<RealType>::radix;
192 static const uint_t _base = std::numeric_limits<RealType>::radix == 2 ?
193 0UL : std::numeric_limits<RealType>::radix;
201 #endif // EXRANDOM_UNIT_NORMAL_DISTRIBUTION_HPP Sample u-rands from the normal distribution, Kahn's method (deprecated)
Sample u-rands exactly from the unit normal distribution.
friend std::istream & operator>>(std::istream &is, unit_normal_distribution &)
void param(const param_type &)
unit_normal_distribution()
Parameter type for unit_normal_distribution.
Definition of rand_digit.
unit_normal_distribution< RealType > distribution_type
result_type operator()(Generator &g, const param_type &)
Sample exactly from the unit normal distribution.
friend bool operator==(const unit_normal_distribution< RealType > &, const unit_normal_distribution< RealType > &)
Definition of unit_normal_dist.
Definition of unit_normal_kahn.
unit_normal_distribution(const param_type &)
result_type operator()(Generator &g)
friend bool operator!=(const unit_normal_distribution< RealType > &, const unit_normal_distribution< RealType > &)
friend std::ostream & operator<<(std::ostream &os, const unit_normal_distribution< RealType > &)