32 #ifndef VSMC_RNG_WEIBULL_DISTRIBUTION_HPP 33 #define VSMC_RNG_WEIBULL_DISTRIBUTION_HPP 45 template <
typename RealType>
48 return a > 0 && b > 0;
55 template <
typename RealType>
69 template <
typename RNGType>
83 template <std::
size_t,
typename RealType,
typename RNGType>
85 RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
92 mul(n, static_cast<RealType>(-1), r, r);
107 #endif // VSMC_RNG_WEIBULL_DISTRIBUTION_HPP
void mul(std::size_t n, const float *a, const float *b, float *y)
bool weibull_distribution_check_param(RealType a, RealType b)
#define VSMC_DEFINE_RNG_DISTRIBUTION_2(Name, name, p1, v1, p2, v2)
#define VSMC_DEFINE_RNG_DISTRIBUTION_IMPL_2(name, p1, p2)
void u01_oo_distribution(RNGType &rng, std::size_t n, RealType *r)
Generate standard uniform random variates on (0, 1)
void weibull_distribution_impl(RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
Standard uniform distribution on (0, 1)
void pow(std::size_t n, const float *a, const float *b, float *y)
RealType u01(UIntType u) noexcept
Convert uniform unsigned integers to floating points within [0, 1].
#define VSMC_DEFINE_RNG_DISTRIBUTION_MEMBER_0
#define VSMC_DEFINE_RNG_DISTRIBUTION_RAND_2(Name, name, p1, p2)
void log(std::size_t n, const float *a, float *y)