32 #ifndef VSMC_RNG_LEVY_DISTRIBUTION_HPP 33 #define VSMC_RNG_LEVY_DISTRIBUTION_HPP 44 template <
typename RealType>
54 template <
typename RealType>
69 template <
typename RNGType>
76 return param.
a() + param.
b() / (r * r);
83 template <std::
size_t,
typename RealType,
typename RNGType>
85 RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
88 rng, n, r, static_cast<RealType>(0), static_cast<RealType>(1));
94 for (std::size_t i = 0; i != n; ++i)
95 if (!std::isfinite(r[i]))
108 #endif // VSMC_RNG_LEVY_DISTRIBUTION_HPP
#define VSMC_DEFINE_RNG_DISTRIBUTION_2(Name, name, p1, v1, p2, v2)
#define VSMC_DEFINE_RNG_DISTRIBUTION_IMPL_2(name, p1, p2)
void levy_distribution_impl(RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
void normal_distribution(RNGType &, std::size_t, RealType *, RealType, RealType)
Generating Normal random variates.
void inv(std::size_t n, const float *a, float *y)
#define VSMC_DEFINE_RNG_DISTRIBUTION_MEMBER_1(T1, m1)
void fma(std::size_t n, const T *a, const T *b, const T *c, T *y)
For , compute .
#define VSMC_DEFINE_RNG_DISTRIBUTION_RAND_2(Name, name, p1, p2)
bool levy_distribution_check_param(RealType, RealType b)
void sqr(std::size_t n, const float *a, float *y)