vSMC  v3.0.0
Scalable Monte Carlo
Public Member Functions | List of all members
vsmc::ResampleAlgorithm< U01SeqType, Residual > Class Template Reference

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...
 

Detailed Description

template<typename U01SeqType, bool Residual>
class vsmc::ResampleAlgorithm< U01SeqType, Residual >

Resampling algorithm.

Definition at line 49 of file algorithm.hpp.

Member Function Documentation

template<typename U01SeqType , bool Residual>
template<typename RNGType , typename InputIter , typename OutputIter >
OutputIter vsmc::ResampleAlgorithm< U01SeqType, Residual >::operator() ( std::size_t  N,
std::size_t  M,
RNGType &  rng,
InputIter  weight,
OutputIter  replication 
) const
inline

Generate replication numbers from normalized weights.

Parameters
NSample size before resampling
MSample size after resampling
rngAn RNG engine
weightN-vector of normalized weights
replicationN-vector of replication numbers

Definition at line 60 of file algorithm.hpp.