32 #ifndef VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP 33 #define VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP 44 template <
typename RealType>
54 template <
typename RealType>
68 template <
typename RNGType>
80 template <std::
size_t,
typename RealType,
typename RNGType>
82 RNGType &rng, std::size_t n, RealType *r, RealType sigma)
86 mul(n, -2 * sigma * sigma, r, r);
99 #endif // VSMC_RNG_RAYLEIGH_DISTRIBUTION_HPP
#define VSMC_DEFINE_RNG_DISTRIBUTION_IMPL_1(name, p1)
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)
Standard uniform distribution on (0, 1].
result_type sigma() const
RealType u01(UIntType u) noexcept
Convert uniform unsigned integers to floating points within [0, 1].
bool rayleigh_distribution_check_param(RealType sigma)
void rayleigh_distribution_impl(RNGType &rng, std::size_t n, RealType *r, RealType sigma)
#define VSMC_DEFINE_RNG_DISTRIBUTION_MEMBER_0
void u01_oc_distribution(RNGType &rng, std::size_t n, RealType *r)
Generate standard uniform random variates on (0, 1].
void log(std::size_t n, const float *a, float *y)
#define VSMC_DEFINE_RNG_DISTRIBUTION_RAND_1(Name, name, p1)
#define VSMC_DEFINE_RNG_DISTRIBUTION_1(Name, name, p1, v1)