vSMC
v3.0.0
Scalable Monte Carlo
|
Resampling algorithm functor classes. More...
Classes | |
class | vsmc::ResampleAlgorithm< U01SeqType, Residual > |
Resampling algorithm. More... | |
class | vsmc::ResampleIndex< IntType > |
Record and trace resampling index. More... | |
class | vsmc::ResampleTypeTrait< ResampleScheme > |
Type trait of ResampleScheme parameter. More... | |
class | vsmc::ResampleTypeTrait< Multinomial > |
Type trait of Multinomial scheme. More... | |
class | vsmc::ResampleTypeTrait< Residual > |
Type trait of Residual scheme. More... | |
class | vsmc::ResampleTypeTrait< ResidualStratified > |
Type trait of ResidualStratified scheme. More... | |
class | vsmc::ResampleTypeTrait< ResidualSystematic > |
Type trait of ResidualSystematic scheme. More... | |
class | vsmc::ResampleTypeTrait< Stratified > |
Type trait of Stratified scheme. More... | |
class | vsmc::ResampleTypeTrait< Systematic > |
Type trait of Systematic scheme. More... | |
Typedefs | |
using | vsmc::ResampleMultinomial = ResampleAlgorithm< U01SequenceSorted, false > |
Multinomial resampling. More... | |
using | vsmc::ResampleResidual = ResampleAlgorithm< U01SequenceSorted, true > |
Residual resampling. More... | |
using | vsmc::ResampleResidualStratified = ResampleAlgorithm< U01SequenceStratified, true > |
Residual stratified resampling. More... | |
using | vsmc::ResampleResidualSystematic = ResampleAlgorithm< U01SequenceSystematic, true > |
Residual systematic resampling. More... | |
using | vsmc::ResampleStratified = ResampleAlgorithm< U01SequenceStratified, false > |
Stratified resampling. More... | |
using | vsmc::ResampleSystematic = ResampleAlgorithm< U01SequenceSystematic, false > |
Systematic resampling. More... | |
template<ResampleScheme Scheme> | |
using | vsmc::ResampleType = typename ResampleTypeTrait< Scheme >::type |
Type of resample class corresponding to ResampleScheme parameter. More... | |
Functions | |
template<typename InputIter , typename OutputIter > | |
OutputIter | vsmc::resample_trans_rep_index (std::size_t N, std::size_t M, InputIter replication, OutputIter index) |
Transform replication numbers into parent indices. More... | |
template<typename InputIter , typename OutputIterR , typename OutputIterI > | |
std::size_t | vsmc::resample_trans_residual (std::size_t N, std::size_t M, InputIter weight, OutputIterR resid, OutputIterI integ) |
Transform normalized weights to normalized residual and integrals,. More... | |
template<typename InputIter , typename OutputIter , typename U01SeqType > | |
OutputIter | vsmc::resample_trans_u01_rep (std::size_t N, std::size_t M, InputIter weight, U01SeqType &&u01seq, OutputIter replication) |
Transform uniform [0, 1) sequence into replication numbers. More... | |
Resampling algorithm functor classes.
using vsmc::ResampleMultinomial = typedef ResampleAlgorithm<U01SequenceSorted, false> |
Multinomial resampling.
Definition at line 161 of file algorithm.hpp.
using vsmc::ResampleResidual = typedef ResampleAlgorithm<U01SequenceSorted, true> |
Residual resampling.
Definition at line 173 of file algorithm.hpp.
using vsmc::ResampleResidualStratified = typedef ResampleAlgorithm<U01SequenceStratified, true> |
Residual stratified resampling.
Definition at line 178 of file algorithm.hpp.
using vsmc::ResampleResidualSystematic = typedef ResampleAlgorithm<U01SequenceSystematic, true> |
Residual systematic resampling.
Definition at line 183 of file algorithm.hpp.
using vsmc::ResampleStratified = typedef ResampleAlgorithm<U01SequenceStratified, false> |
Stratified resampling.
Definition at line 165 of file algorithm.hpp.
using vsmc::ResampleSystematic = typedef ResampleAlgorithm<U01SequenceSystematic, false> |
Systematic resampling.
Definition at line 169 of file algorithm.hpp.
using vsmc::ResampleType = typedef typename ResampleTypeTrait<Scheme>::type |
Type of resample class corresponding to ResampleScheme parameter.
Definition at line 247 of file algorithm.hpp.
|
inline |
Transform replication numbers into parent indices.
N | Sample size before resampling |
M | Sample size after resampling |
replication | N-vector of replication numbers |
index | M-vector of parent indices |
Definition at line 130 of file transform.hpp.
|
inline |
Transform normalized weights to normalized residual and integrals,.
N | Sample size before resampling |
M | Sample size after resampling |
weight | N-vector of normalized weights |
resid | N-vector of normalized residuals |
integ | N-vector of integral parts |
Definition at line 50 of file transform.hpp.
|
inline |
Transform uniform [0, 1) sequence into replication numbers.
N | Sample size before resampling |
M | Sample size after resampling |
weight | N-vector of normalized weights |
u01seq | M ordered uniform [0, 1) random numbers |
replication | N-vector of replication numbers |
Definition at line 90 of file transform.hpp.