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

Action that splits every point into factor points along each axis, sharing its probability equally. More...

#include <EmrysFilter/Distributions/Upkeep.h>

Public Member Functions

template<typename State>
requires requires(State & state, Eigen::Index factor) { state.subdivide(factor); }
std::expected< bool, WeightError > operator() (State &state) const
 Subdivides state.

Public Attributes

std::ptrdiff_t factor = 2
 the number of new cells along each axis per old cell

Detailed Description

Action that splits every point into factor points along each axis, sharing its probability equally.

The state is anything with subdivide(factor), such as the GridGaussianParams of a regular grid with at most one cell covariance (see GridGaussianParams::subdivide()). Splitting every cell at once keeps the cells alike, so a filter that shares one covariance among them still can. On a grid of point masses, with no cell covariance, it widens the distribution; GridGaussianParams::subdivide() says by how much.

Prune before subdividing: a PruneBelow after it, at the same threshold, removes more, since each child holds a share of its parent's probability. A flat cell index saved before a subdivide means nothing after it.

Member Function Documentation

◆ operator()()

template<typename State>
requires requires(State & state, Eigen::Index factor) { state.subdivide(factor); }
std::expected< bool, WeightError > Emrys::upkeep::Subdivide::operator() ( State & state) const
inlinenodiscard

Subdivides state.

Returns
whether the factor was above one, so the cells changed

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