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

Draws one uniform in each of M equal strata of [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, one drawn in each stratum of [0, 1), using 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, with the uniforms drawn first in stratum order, as the sequential form draws them.

Detailed Description

Draws one uniform in each of M equal strata of [0, 1).

Stratified sampling as Kitagawa (1996) applies it to the Monte Carlo filter, as given in Douc, Cappé, and Moulines (2005), §2.3: position \( j \) is \( (j + u_j) / M \) with independent \( u_j \).

Member Function Documentation

◆ operator()()

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

As the sequential form, under policy, with the uniforms drawn first in stratum order, as the sequential form draws them.

Under Sequential it is the sequential form.


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