EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::resamplers::Systematic Struct Reference

Uses one uniform offset for M evenly spaced positions in [0, 1). More...

#include <EmrysFilter/Core/Resampling.h>

Public Member Functions

template<std::floating_point Scalar, std::uniform_random_bit_generator G>
void operator() (std::span< Scalar const > weights, std::span< Eigen::Index > ancestors, G &rng) const
 Fills ancestors with indices into weights at \( M \) evenly spaced positions offset by one uniform draw from rng.
template<ExecutionPolicy P, std::floating_point Scalar, std::uniform_random_bit_generator G>
void operator() (P &&policy, std::span< Scalar const > weights, std::span< Eigen::Index > ancestors, G &rng) const
 As the sequential form, under policy.

Detailed Description

Uses one uniform offset for M evenly spaced positions in [0, 1).

Index i is chosen either floor or ceil of \( M w_i / \sum w \) times. Low variance and cheap; the usual default.

The systematic resampling of Carpenter, Clifford, and Fearnhead (1999), as given in Douc, Cappé, and Moulines (2005), §2.4, who credit Carpenter et al.; Arulampalam et al. (2002), §V-A, credit Kitagawa (1996) instead: position \( j \) is \( (j + u) / M \) with one uniform \( u \) for all.

Member Function Documentation

◆ operator()()

template<ExecutionPolicy P, std::floating_point Scalar, std::uniform_random_bit_generator G>
void Emrys::resamplers::Systematic::operator() ( P && policy,
std::span< Scalar const > weights,
std::span< Eigen::Index > ancestors,
G & rng ) const
inline

As the sequential form, under policy.

Under Sequential it is the sequential form.


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