32 #ifndef VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP    33 #define VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP    44 template <
typename RealType>
    54 template <
typename RealType>
    66         return std::numeric_limits<result_type>::max 
VSMC_MNE();
    72     template <
typename RNGType>
    84 template <
typename RealType, 
typename RNGType>
    86     RNGType &rng, std::size_t n, RealType *r, RealType sigma)
    90     mul(n, -2 * sigma * sigma, r, r);
    98 template <
typename RealType, 
typename RNGType>
   100     RNGType &rng, std::size_t n, RealType *r, RealType sigma)
   102     const std::size_t k = 1000;
   103     const std::size_t m = n / k;
   104     const std::size_t l = n % k;
   105     for (std::size_t i = 0; i != m; ++i)
   110 template <
typename RealType, 
typename RNGType>
   112     std::size_t n, RealType *r)
   119 #endif // VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP 
Standard uniform distribution with open/closed variants. 
 
#define VSMC_DEFINE_RNG_DISTRIBUTION_1(Name, name, T, T1, p1, v1)                      
 
void mul(std::size_t n, const float *a, const float *b, float *y)
 
void sqrt(std::size_t n, const float *a, float *y)
 
result_type sigma() const 
 
void rng_rand(RNGType &rng, BernoulliDistribution< IntType > &dist, std::size_t n, IntType *r)
 
#define VSMC_DEFINE_RNG_DISTRIBUTION_OPERATORS
 
void rayleigh_distribution(RNGType &, std::size_t, RealType *, RealType)
Generating rayleigh random variates. 
 
bool rayleigh_distribution_check_param(RealType sigma)
 
void rayleigh_distribution_impl(RNGType &rng, std::size_t n, RealType *r, RealType sigma)
 
void u01_oc_distribution(RNGType &rng, std::size_t n, RealType *r)
Generate standard uniform random variates on open-closed interval. 
 
void log(std::size_t n, const float *a, float *y)