vSMC
v3.0.0
Scalable Monte Carlo
|
Resampling algorithm. More...
#include <vsmc/resample/algorithm.hpp>
Public Member Functions | |
template<typename RNGType , typename InputIter , typename OutputIter > | |
OutputIter | operator() (std::size_t N, std::size_t M, RNGType &rng, InputIter weight, OutputIter replication) const |
Generate replication numbers from normalized weights. More... | |
Resampling algorithm.
Definition at line 49 of file algorithm.hpp.
|
inline |
Generate replication numbers from normalized weights.
N | Sample size before resampling |
M | Sample size after resampling |
rng | An RNG engine |
weight | N-vector of normalized weights |
replication | N-vector of replication numbers |
Definition at line 60 of file algorithm.hpp.