EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
GridGaussian.h File Reference

Grids of points and the state over them (decisions.md [rb-point-mass], [rao-blackwellized-core]): GridAxis and GridCells for a regular grid, PointCells for given points, PointGrid with regularGrid() and pointGrid() for fixed points of one block with optional cell covariances, and GridGaussianParams, the live cells with their probabilities and a Gaussian or a hybrid of Gaussians over the rest each, which prunes and subdivides, the point-mass filters' state, with its density GridGaussian, which gives the collapse. More...

#include <algorithm>
#include <array>
#include <expected>
#include <cmath>
#include <cstddef>
#include <optional>
#include <span>
#include <type_traits>
#include <utility>
#include <vector>
#include <EmrysFilter/Core/Allocation.h>
#include <EmrysFilter/Core/Execution.h>
#include <EmrysFilter/Core/Macros.h>
#include <EmrysFilter/Core/Math.h>
#include <EmrysFilter/Core/Print.h>
#include <EmrysFilter/Core/Stamp.h>
#include <EmrysFilter/Core/Weights.h>
#include <EmrysFilter/Distributions/Categorical.h>
#include <EmrysFilter/Distributions/Conditionals.h>
#include <EmrysFilter/Distributions/Gaussian.h>
#include <EmrysFilter/Distributions/Hybrid.h>
#include <EmrysFilter/Distributions/Moments.h>
#include <EmrysFilter/Distributions/Params.h>
#include <EmrysFilter/Distributions/SampleSet.h>
#include <EmrysFilter/Distributions/Statistics.h>
#include <EmrysFilter/Spaces/Discrete.h>
#include <EmrysFilter/Spaces/Space.h>
#include <EmrysFilter/Spaces/Subspace.h>
#include <EmrysFilter/Spaces/TagPath.h>

Go to the source code of this file.

Classes

struct  Emrys::GridAxis< Block, I >
 The axis of a regular grid of points (see regularGrid()) along coordinate I of the block Block: a run-time number of cells. More...
struct  Emrys::GridCells< Path >
 The cells of a regular grid over the block named by the path Path: the DiscreteProduct of its GridAxis axes, the last varying fastest, under a tag of its own. More...
struct  Emrys::PointCells< Path >
 The cells of a grid of given points (see pointGrid()) for the block named by the path Path: one value per point, under a tag of its own. More...
class  Emrys::PointGrid< Space_, Path_, Cells_, CellCovariance_, Scalar_, Allocator_ >
 Fixed points for the block named by the path Path_ of a state in Space_, one per value of the discrete space Cells_, such as the cells of a grid of positions. More...
class  Emrys::GridGaussianParams< Grid_, Covariance_, Component_ >
 The parameters of a Rao-Blackwellized point-mass filter's state: the cells of a grid still alive, their probabilities, and for each a Gaussian, or a hybrid of Gaussians, over the rest of the state. More...
class  Emrys::GridGaussian< Grid_, Covariance_, Component_ >
 The density of a Rao-Blackwellized point-mass filter's state, a checked view of its GridGaussianParams (decisions.md [params-and-density], [view-stamp]): \( p(x) = \sum_c P(c) \, \delta(x_p - p_c) \, \mathcal{N}(x_r; \mu_c, \Sigma_c) \) over the live cells, or the hybrid of Gaussians in each cell. More...

Functions

template<typename P, Space S, typename Derived, typename Allocator = DefaultAllocator>
auto Emrys::pointGrid (S space, Eigen::MatrixBase< Derived > const &centers, std::optional< typename Moments< internal::PathTag< P >, typename Derived::Scalar >::MatrixType > cellCovariance={}, Allocator const &allocator={})
template<typename P, Space S, typename Derived, typename Allocator = DefaultAllocator>
auto Emrys::pointGrid (S space, Eigen::MatrixBase< Derived > const &centers, std::span< typename Moments< internal::PathTag< P >, typename Derived::Scalar >::MatrixType const > cellCovariances, Allocator const &allocator={})
template<FixedSizeSpace S, typename P, typename Derived, typename Allocator = DefaultAllocator>
auto Emrys::pointGrid (Eigen::MatrixBase< Derived > const &centers, std::optional< typename Moments< internal::PathTag< P >, typename Derived::Scalar >::MatrixType > cellCovariance={}, Allocator const &allocator={})
 pointGrid(space, centers, ...) in the FixedSizeSpace S, named as the first template argument: pointGrid<State, Position>(centers) (decisions.md [space-storage]).
template<FixedSizeSpace S, typename P, typename Derived, typename Allocator = DefaultAllocator>
auto Emrys::pointGrid (Eigen::MatrixBase< Derived > const &centers, std::span< typename Moments< internal::PathTag< P >, typename Derived::Scalar >::MatrixType const > cellCovariances, Allocator const &allocator={})
 pointGrid(space, centers, cellCovariances, ...) in the FixedSizeSpace S, named as the first template argument.
template<typename P, Space S, typename FirstDerived, typename SpacingDerived, typename Allocator = DefaultAllocator>
auto Emrys::regularGrid (S space, Eigen::MatrixBase< FirstDerived > const &first, Eigen::MatrixBase< SpacingDerived > const &spacing, std::array< Eigen::Index, std::size_t(internal::PathTag< P >::FixedValueDimension)> const &counts, std::optional< typename Moments< internal::PathTag< P >, typename FirstDerived::Scalar >::MatrixType > cellCovariance={}, Allocator const &allocator={})
template<typename P, Space S, typename FirstDerived, typename SpacingDerived, typename Allocator = DefaultAllocator>
auto Emrys::regularGrid (S space, Eigen::MatrixBase< FirstDerived > const &first, Eigen::MatrixBase< SpacingDerived > const &spacing, std::array< Eigen::Index, std::size_t(internal::PathTag< P >::FixedValueDimension)> const &counts, std::span< typename Moments< internal::PathTag< P >, typename FirstDerived::Scalar >::MatrixType const > cellCovariances, Allocator const &allocator={})
 regularGrid() with cellCovariances, each cell's covariance about its center in flat-index order, as on a latitude-longitude grid whose cells narrow toward the poles.
template<FixedSizeSpace S, typename P, typename FirstDerived, typename SpacingDerived, typename Allocator = DefaultAllocator>
auto Emrys::regularGrid (Eigen::MatrixBase< FirstDerived > const &first, Eigen::MatrixBase< SpacingDerived > const &spacing, std::array< Eigen::Index, std::size_t(internal::PathTag< P >::FixedValueDimension)> const &counts, std::optional< typename Moments< internal::PathTag< P >, typename FirstDerived::Scalar >::MatrixType > cellCovariance={}, Allocator const &allocator={})
 regularGrid(space, first, spacing, counts, ...) in the FixedSizeSpace S, named as the first template argument: regularGrid<State, Position>(first, spacing, {200, 200}) (decisions.md [space-storage]).
template<FixedSizeSpace S, typename P, typename FirstDerived, typename SpacingDerived, typename Allocator = DefaultAllocator>
auto Emrys::regularGrid (Eigen::MatrixBase< FirstDerived > const &first, Eigen::MatrixBase< SpacingDerived > const &spacing, std::array< Eigen::Index, std::size_t(internal::PathTag< P >::FixedValueDimension)> const &counts, std::span< typename Moments< internal::PathTag< P >, typename FirstDerived::Scalar >::MatrixType const > cellCovariances, Allocator const &allocator={})
 regularGrid(space, first, spacing, counts, cellCovariances, ...) in the FixedSizeSpace S, named as the first template argument.

Detailed Description

Grids of points and the state over them (decisions.md [rb-point-mass], [rao-blackwellized-core]): GridAxis and GridCells for a regular grid, PointCells for given points, PointGrid with regularGrid() and pointGrid() for fixed points of one block with optional cell covariances, and GridGaussianParams, the live cells with their probabilities and a Gaussian or a hybrid of Gaussians over the rest each, which prunes and subdivides, the point-mass filters' state, with its density GridGaussian, which gives the collapse.

Read ParticleGaussian.h next; the design review is docs/guide/rao-blackwellized-filters.md.