|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
Draws each ancestor independently. 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, std::span< Scalar > scratch) const |
| Fills ancestors with indices into weights, each drawn independently in proportion to its weight, using rng, sorting the draws in scratch, which has at least as many elements as ancestors. | |
| 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 |
| As the form with scratch, allocating the scratch for the draws. | |
| 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: the uniforms are drawn as it draws them but not sorted, so each ancestor is the inversion of its own draw, and the ancestors come in the order of the draws. | |
Draws each ancestor independently.
Highest variance; mainly a reference.
The resampling of the bootstrap filter of Gordon, Salmond, and Smith (1993): \( M \) independent uniforms, sorted, invert the cumulative weights.
|
inline |
As the sequential form, under policy: the uniforms are drawn as it draws them but not sorted, so each ancestor is the inversion of its own draw, and the ancestors come in the order of the draws.
Under Sequential it is the sequential form.