EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::ImmFilterUpdate< ModeUpdate, Scalar_, Allocator > Struct Template Reference

What an IMM filter's update did: each mode's update before reduction, the observation's log-likelihood over every mode, and whether any mode accepted the measurement. More...

#include <EmrysFilter/Filters/ImmFilter.h>

Public Types

using Scalar = Scalar_
 the scalar type
using ModeUpdateType = ModeUpdate
 one mode's update
using ModeUpdatesType = internal::Buffer<ModeUpdate, Allocator>
 the modes' container

Public Member Functions

 ImmFilterUpdate ()=default
 an empty result, from a default-constructed allocator
 ImmFilterUpdate (Allocator const &allocator)
 An empty result whose modes' updates come from allocator.
Allocator get_allocator () const
Scalar logLikelihood () const

Public Attributes

ModeUpdatesType modes
 one per mode, in flat-index order
bool accepted = false
 whether any mode accepted the measurement

Detailed Description

template<typename ModeUpdate, typename Scalar_ = double, typename Allocator = DefaultAllocator>
struct Emrys::ImmFilterUpdate< ModeUpdate, Scalar_, Allocator >

What an IMM filter's update did: each mode's update before reduction, the observation's log-likelihood over every mode, and whether any mode accepted the measurement.

modes[m] is the update of mode m's component (see FilterUpdate), with its log-likelihood \( \log p(z \mid m) \) and its branches labeled with mode = m. Its accepted is false when the policy, such as a Gate, rejected the measurement in that mode. When accepted is false here, every mode rejected it and the state kept its prior.

The modes' updates come from Allocator. Passing the same result, made from the allocator, to each ImmFilter::update(measurement, policy, result) reuses their storage, and a mode's update of mixture noise (a ReusableFilterUpdate) keeps its scratch, so an update allocates nothing once the result has been as large (see Allocation).

Template Parameters
ModeUpdateone mode's update: a FilterUpdate, or a ReusableFilterUpdate for mixture noise
Scalar_the scalar type
Allocatorwhere the modes' updates come from

Member Function Documentation

◆ get_allocator()

template<typename ModeUpdate, typename Scalar_ = double, typename Allocator = DefaultAllocator>
Allocator Emrys::ImmFilterUpdate< ModeUpdate, Scalar_, Allocator >::get_allocator ( ) const
inlinenodiscard
Returns
the allocator the modes' updates come from

◆ logLikelihood()

template<typename ModeUpdate, typename Scalar_ = double, typename Allocator = DefaultAllocator>
Scalar Emrys::ImmFilterUpdate< ModeUpdate, Scalar_, Allocator >::logLikelihood ( ) const
inlinenodiscard
Returns
\( \log p(z) = \log \sum_m P(m) \, p(z \mid m) \), with the predicted mode probabilities

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