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

What a filter's update did: the branches of the update before reduction, with their weights and innovations but not their posteriors (decisions.md [innovation-statistics]), and whether the reduction policy accepted the measurement. More...

#include <EmrysFilter/Models/MeasurementUpdate.h>

Public Types

using Scalar = Scalar_
 the scalar type
using MeasurementSpaceType = MeasurementSpace
 the measurement space
using BranchType = FilterBranch<MeasurementSpace, Scalar>
 one branch
using allocator_type = Allocator
 where a run-time number of branches comes from
using Container
 The branches' container: an array when their number is known at compile time, and otherwise a buffer from Allocator.

Public Member Functions

 FilterUpdate ()=default
 no branches, not accepted
 FilterUpdate (Container branches, Scalar mixtureLogLikelihood=0, bool accepted=false)
 The branches branches, as MeasurementUpdate(branches, mixtureLogLikelihood), and whether the policy accepted the measurement, accepted.
Scalar logLikelihood () const
Eigen::Index innovationSize () const
Allocator get_allocator () const

Public Attributes

Container branches
 one per noise component, weights summing to one
bool accepted = false
 whether the policy accepted the measurement

Static Public Attributes

static constexpr std::size_t BranchCount = Count
 the number of branches, or std::dynamic_extent

Detailed Description

template<typename MeasurementSpace, std::size_t Count = std::dynamic_extent, typename Scalar_ = double, typename Allocator = DefaultAllocator>
struct Emrys::FilterUpdate< MeasurementSpace, Count, Scalar_, Allocator >

What a filter's update did: the branches of the update before reduction, with their weights and innovations but not their posteriors (decisions.md [innovation-statistics]), and whether the reduction policy accepted the measurement.

The log-likelihood and each branch's NIS are computed from the innovations when first asked for, unless the filter had them already. When accepted is false, the policy (such as a Gate) rejected the measurement and the state kept its prior. Pass it to a NisMonitor as any update.

Template Parameters
MeasurementSpacethe measurement space
Countnumber of branches if known at compile time, otherwise std::dynamic_extent
Scalar_the scalar type
Allocatorwhere a run-time number of branches comes from (see Allocation)

Member Typedef Documentation

◆ Container

template<typename MeasurementSpace, std::size_t Count = std::dynamic_extent, typename Scalar_ = double, typename Allocator = DefaultAllocator>
using Emrys::FilterUpdate< MeasurementSpace, Count, Scalar_, Allocator >::Container
Initial value:
std::conditional_t<
Count == std::dynamic_extent,
internal::Buffer<BranchType, Allocator>,
std::array<BranchType, Count>>

The branches' container: an array when their number is known at compile time, and otherwise a buffer from Allocator.

Member Function Documentation

◆ get_allocator()

template<typename MeasurementSpace, std::size_t Count = std::dynamic_extent, typename Scalar_ = double, typename Allocator = DefaultAllocator>
Allocator Emrys::FilterUpdate< MeasurementSpace, Count, Scalar_, Allocator >::get_allocator ( ) const
inlinenodiscard
Returns
the allocator a run-time number of branches comes from, or a default-constructed one for an array of them

◆ innovationSize()

template<typename MeasurementSpace, std::size_t Count = std::dynamic_extent, typename Scalar_ = double, typename Allocator = DefaultAllocator>
Eigen::Index Emrys::FilterUpdate< MeasurementSpace, Count, Scalar_, Allocator >::innovationSize ( ) const
inlinenodiscard
Returns
the difference dimension of the innovation, the degrees of freedom of each NIS

◆ logLikelihood()

template<typename MeasurementSpace, std::size_t Count = std::dynamic_extent, typename Scalar_ = double, typename Allocator = DefaultAllocator>
Scalar Emrys::FilterUpdate< MeasurementSpace, Count, Scalar_, Allocator >::logLikelihood ( ) const
inlinenodiscard
Returns
the observation's log-likelihood, \( \log p(z) = \log \sum_k w_k \, p(z \mid k) \)

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