pf
pf::rvsamp::k_gen< N, float_t > 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::rvsamp::k_gen< N, float_t >:
Collaboration diagram for pf::rvsamp::k_gen< N, float_t >:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from pf::rvsamp::rvsamp_base
std::mt19937 m_rng
 prng
 

Detailed Description

template<size_t N, typename float_t>
class pf::rvsamp::k_gen< N, float_t >

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

Author
taylor

Member Function Documentation

◆ sample()

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

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

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

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