EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ > Class Template Reference

The density of a Rao-Blackwellized particle filter's state, a checked view of its ParticleGaussianParams (decisions.md [params-and-density], [view-stamp]): \( p(x) = \sum_i w_i \, \delta(x_p - p_i) \, \mathcal{N}(x_r; \mu_i, \Sigma_i) \), or with a hybrid per particle, a mixture over its modes in place of each Gaussian. More...

#include <EmrysFilter/Distributions/ParticleGaussian.h>

Public Types

using ParamsType
 the parameters
using Scalar = Scalar_
 the scalar type
using SpaceType = Space_
 the whole state space
using PinnedSpace = typename ParamsType::PinnedSpace
 the sampled block's space
using RestSpace = typename ParamsType::RestSpace
 the rest's space, in order
using ConditionalType = typename ParamsType::ConditionalType
 a particle's distribution over the rest
using ParticlesType = typename ParamsType::ParticlesType
 the particles of the block
using MomentsType = Moments<Space_, Scalar_>
 a mean and covariance of the whole state
using allocator_type = Allocator_
 the parameters' allocator

Public Member Functions

Space_ const & space () const
Eigen::Index size () const
ParticlesType const & particles () const
decltype(auto) conditional (Eigen::Index i) const
GaussianParams< Space_, Scalar_ > collapsed () const
MomentsType moments () const

Static Public Attributes

static constexpr bool IsParams = false
 a view: it checks its parameters

Detailed Description

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
class Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >

The density of a Rao-Blackwellized particle filter's state, a checked view of its ParticleGaussianParams (decisions.md [params-and-density], [view-stamp]): \( p(x) = \sum_i w_i \, \delta(x_p - p_i) \, \mathcal{N}(x_r; \mu_i, \Sigma_i) \), or with a hybrid per particle, a mixture over its modes in place of each Gaussian.

ParticleGaussianParams::toDensity() makes one after checking the weights and factorizing each particle's Gaussian, or checking its hybrid, so the moments and the collapse below read a distribution.

auto const density = filter.state().toDensity();
density->collapsed(); // the whole state as one GaussianParams
density->moments(); // its mean and covariance
See also
class ParticleGaussianParams, RbParticleFilter

Member Typedef Documentation

◆ ParamsType

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
using Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::ParamsType
Initial value:
The parameters of a Rao-Blackwellized particle filter's state: weighted particles for one block of th...
Definition ParticleGaussian.h:192

the parameters

Member Function Documentation

◆ collapsed()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
GaussianParams< Space_, Scalar_ > Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::collapsed ( ) const
inlinenodiscard
Returns
the whole state as one Gaussian, moment-matched over the particles: their spread for the sampled block, and their Gaussians, or each particle's hybrid collapsed over its modes, for the rest

◆ conditional()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
decltype(auto) Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::conditional ( Eigen::Index i) const
inlinenodiscard
Returns
particle i's distribution over the rest of the state

◆ moments()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
MomentsType Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::moments ( ) const
inlinenodiscard
Returns
the mean and covariance of the whole state, those of collapsed()

◆ particles()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
ParticlesType const & Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::particles ( ) const
inlinenodiscard
Returns
the particles of the sampled block, with their weights, which define a distribution

◆ size()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
Eigen::Index Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::size ( ) const
inlinenodiscard
Returns
the number of particles

◆ space()

template<Space Space_, typename Path_, typename Covariance_, RealScalar Scalar_, typename Allocator_, typename Component_>
Space_ const & Emrys::ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ >::space ( ) const
inlinenodiscard
Returns
the whole state space

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