pf
pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t > Class Template Referenceabstract

Base class for resampler types that use a Hilbert curve sorting technique. More...

#include <resamplers.h>

Public Types

using ssv = Eigen::Matrix< float_t, dimx, 1 >
 
using arrayVec = std::array< ssv, nparts >
 
using arrayFloat = std::array< float_t, nparts >
 
using usvr = Eigen::Matrix< float_t, dimur, 1 >
 

Public Member Functions

 rbase_hcs ()=default
 The default constructor. There is no seed-setting.
 
virtual void resampLogWts (arrayVec &oldParts, arrayFloat &oldLogUnNormWts, const usvr &ur)=0
 Function to resample from log unnormalized weights. More...
 
std::array< unsigned, nparts > get_permutation (const arrayVec &unsortedParts)
 get a permutation based on unsorted particle samples (not their weights) More...
 

Static Private Member Functions

static bool hilbertComparison (const ssv &first, const ssv &second)
 Function that "sorts" multidimensional vectors using an (inverse) Hilbert-curve map. For more information see https://arxiv.org/pdf/1511.04992.pdf.
 

Detailed Description

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t>
class pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >

Base class for resampler types that use a Hilbert curve sorting technique.

Author
taylor
Date
08/06/21

Member Typedef Documentation

◆ arrayFloat

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
using pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::arrayFloat = std::array<float_t,nparts>

type alias for array of float_ts

◆ arrayVec

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
using pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::arrayVec = std::array<ssv, nparts>

type alias for array of Eigen Matrices

◆ ssv

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
using pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::ssv = Eigen::Matrix<float_t,dimx,1>

type alias for linear algebra stuff

◆ usvr

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
using pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::usvr = Eigen::Matrix<float_t,dimur,1>

type alias for common normal random variable

Member Function Documentation

◆ get_permutation()

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
std::array< unsigned, nparts > pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::get_permutation ( const arrayVec unsortedParts)

get a permutation based on unsorted particle samples (not their weights)

Parameters
unsortedPartsthe particle samples
Returns
the permutation as a std::array

◆ resampLogWts()

template<size_t nparts, size_t dimx, size_t dimur, size_t num_hilb_bits, typename float_t >
virtual void pf::resamplers::rbase_hcs< nparts, dimx, dimur, num_hilb_bits, float_t >::resampLogWts ( arrayVec oldParts,
arrayFloat oldLogUnNormWts,
const usvr ur 
)
pure virtual

Function to resample from log unnormalized weights.

Parameters
oldParts
oldLogUnNormWts
urcommon random number used to resample.

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