pf
pf::k_gen< N > Class Template Reference

A class that performs sampling with replacement (useful for the index sampler in an APF) More...

#include <rv_samp.h>

Inheritance diagram for pf::k_gen< N >:
Collaboration diagram for pf::k_gen< N >:

Public Member Functions

 k_gen ()
 default constructor. only one available.
 
std::array< unsigned int, N > sample (const std::array< double, N > &logWts)
 sample N times from (0,1,...N-1) More...
 
- Public Member Functions inherited from pf::rvsamp_base< N >
 rvsamp_base ()
 The default constructor. This is the only option available. Sets the seed with the clock.
 

Additional Inherited Members

- Public Types inherited from pf::rvsamp_base< N >
using ssv = Eigen::Matrix< double, dim, 1 >
 
- Protected Attributes inherited from pf::rvsamp_base< N >
std::mt19937 m_rng
 prng
 

Detailed Description

template<size_t N>
class pf::k_gen< N >

A class that performs sampling with replacement (useful for the index sampler in an APF)

Author
taylor

Member Function Documentation

template<size_t N>
std::array< unsigned int, N > pf::k_gen< N >::sample ( const std::array< double, N > &  logWts)

sample N times from (0,1,...N-1)

Parameters
logWtspossibly unnormalized type std::array<double, N>
Returns
the integers in a std::array<unsigned int, N>

The documentation for this class was generated from the following file: