EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::RbParticleFilterUpdate< Scalar, Allocator > Class Template Reference

What a Rao-Blackwellized particle filter's update did, per particle and in total. More...

#include <EmrysFilter/Filters/RbParticleFilter.h>

Public Types

using ArrayType = Eigen::Map<Eigen::Array<Scalar, Eigen::Dynamic, 1> const>
 a per-particle array
using allocator_type = Allocator
 where the per-particle arrays come from

Public Member Functions

 RbParticleFilterUpdate (Allocator const &allocator={})
 An empty result whose arrays come from allocator.
ArrayType logLikelihoods () const
ArrayType nis () const
Eigen::Index innovationSize () const
allocator_type get_allocator () const
Scalar logLikelihood () const

Public Attributes

bool accepted = false
 whether any particle could explain the observation

Detailed Description

template<typename Scalar = double, typename Allocator = DefaultAllocator>
class Emrys::RbParticleFilterUpdate< Scalar, Allocator >

What a Rao-Blackwellized particle filter's update did, per particle and in total.

A particle whose update the policy rejected has log-likelihood \( -\infty \) and NIS NaN, and weight zero afterwards. When accepted is false, no particle could explain the observation, and the state was left as it was.

The result owns its per-particle arrays, in storage from Allocator. An update into a result (RbParticleFilter::update(measurement, result)) refills that storage, so a result kept across steps allocates nothing once it has held as many particles (see Allocation).

Member Function Documentation

◆ get_allocator()

template<typename Scalar = double, typename Allocator = DefaultAllocator>
allocator_type Emrys::RbParticleFilterUpdate< Scalar, Allocator >::get_allocator ( ) const
inlinenodiscard
Returns
the allocator the per-particle arrays come from

◆ innovationSize()

template<typename Scalar = double, typename Allocator = DefaultAllocator>
Eigen::Index Emrys::RbParticleFilterUpdate< Scalar, Allocator >::innovationSize ( ) const
inlinenodiscard
Returns
the difference dimension of the innovation

◆ logLikelihood()

template<typename Scalar = double, typename Allocator = DefaultAllocator>
Scalar Emrys::RbParticleFilterUpdate< Scalar, Allocator >::logLikelihood ( ) const
inlinenodiscard
Returns
\( \log \sum_i \hat w_i \, p(z \mid i) \), with the prior weights normalized

◆ logLikelihoods()

template<typename Scalar = double, typename Allocator = DefaultAllocator>
ArrayType Emrys::RbParticleFilterUpdate< Scalar, Allocator >::logLikelihoods ( ) const
inlinenodiscard
Returns
\( \log p(z \mid i) \) per particle

◆ nis()

template<typename Scalar = double, typename Allocator = DefaultAllocator>
ArrayType Emrys::RbParticleFilterUpdate< Scalar, Allocator >::nis ( ) const
inlinenodiscard
Returns
each particle's NIS; with mixture noise, its most probable branch's, and with a hybrid per particle, its most probable mode's after the update

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