32 #ifndef VSMC_RESAMPLE_MULTINOMIAL_HPP
33 #define VSMC_RESAMPLE_MULTINOMIAL_HPP
41 typedef cxx11::integral_constant<ResampleScheme, Multinomial>
53 template <
typename IntType,
typename RngType>
54 void operator() (std::size_t M, std::size_t N, RngType &rng,
55 const double *weight, IntType *replication)
58 double *
const uptr = &u01_[0];
59 cxx11::uniform_real_distribution<double> runif(0, 1);
60 for (std::size_t i = 0; i != N; ++i)
62 inversion_(M, N, weight, uptr, replication);
68 std::vector<double, AlignedAllocator<double> > u01_;
73 #endif // VSMC_RESAMPLE_MULTINOMIAL_HPP
cxx11::integral_constant< ResampleScheme, Multinomial > ResampleMultinomial
Resample forward decleration.