EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry Class Reference

Writable access to one entry during forEach(). More...

#include <EmrysFilter/Distributions/Mixture.h>

Public Member Functions

 MutableEntry (MutableEntry const &)=delete
 lives only inside the callback
MutableEntry & operator= (MutableEntry const &)=delete
 Lives only inside the callback.
Scalar logWeight () const
Index index () const
ComponentType const & component () const
template<typename C>
requires std::same_as<std::remove_cvref_t<C>, ComponentType>
void setComponent (C &&component)
 Replaces the entry's component with component, which must be in the mixture's space; see MixtureParams::setComponent().
template<typename F>
requires std::invocable<F &, ComponentType &>
decltype(auto) updateComponent (F &&f)
MomentsType const & moments () const
VectorType const & mean () const
MatrixType const & covarianceLower () const
template<MatrixExpression Mean>
requires (isGaussian<ComponentType>)
void setMean (Mean &&mean)
 Sets the component's mean; see GaussianParams::setMean().
template<MatrixExpression Cov>
requires (isGaussian<ComponentType>)
void setCovariance (Cov &&cov)
 Sets the component's covariance; see GaussianParams::setCovariance().
void setMoments (MomentsType moments)
 Sets the component's mean and covariance to moments.

Detailed Description

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
class Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry

Writable access to one entry during forEach().

Exists only for the duration of the callback; it cannot be copied or moved. The component's dimensions cannot be changed through it.

Member Function Documentation

◆ component()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
ComponentType const & Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::component ( ) const
inlinenodiscard
Returns
the entry's component

◆ covarianceLower()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
MatrixType const & Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::covarianceLower ( ) const
inlinenodiscard
Returns
the component's covariance

◆ index()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
Index Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::index ( ) const
inlinenodiscard
Returns
the entry's position in the mixture, for a callback that writes a slot per entry

◆ logWeight()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
Scalar Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::logWeight ( ) const
inlinenodiscard
Returns
the entry's log-weight

◆ mean()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
VectorType const & Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::mean ( ) const
inlinenodiscard
Returns
the component's mean

◆ moments()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
MomentsType const & Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::moments ( ) const
inlinenodiscard
Returns
the component's mean and covariance together

◆ updateComponent()

template<internal::ComponentOrInfoForm Component_, typename Allocator_ = DefaultAllocator>
template<typename F>
requires std::invocable<F &, ComponentType &>
decltype(auto) Emrys::MixtureParams< Component_, Allocator_ >::MutableEntry::updateComponent ( F && f)
inline
Returns
f called with the entry's component, to change it in place, as a filter's step does; f must keep the component's space, which is asserted after

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