EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::Component Concept Reference

The distribution that a container of several holds one of per element (decisions.md [component-first], [params-and-density]): a Mixture's component, a Hybrid's conditional given a mode. More...

#include <EmrysFilter/Distributions/Component.h>

Concept definition

template<typename C>
concept Component = std::same_as<Density<Params<C>>, C> && requires(Params<C> const & c) {
{ Params<C>::ValueDimensionAtCompileTime } -> std::convertible_to<int>;
{ Params<C>::MaxValueDimensionAtCompileTime } -> std::convertible_to<int>;
{ Params<C>::DifferenceDimensionAtCompileTime } -> std::convertible_to<int>;
{ Params<C>::MaxDifferenceDimensionAtCompileTime } -> std::convertible_to<int>;
{ c.space() } -> std::same_as<typename Params<C>::SpaceType const &>;
{ c.valueDimension() } -> std::same_as<Eigen::Index>;
{ c.differenceDimension() } -> std::same_as<Eigen::Index>;
{ ComponentTraits<Params<C>>::moments(c) } -> std::convertible_to<typename Params<C>::MomentsType>;
{ c.factorize() };
typename ComponentTraits<Params<C>>::Type;
}
The distribution that a container of several holds one of per element (decisions.md [component-first]...
Definition Component.h:299
typename ParamsOf< D >::type Params
The parameters of the density D: GaussianParams for a Gaussian, and D itself for a distribution whose...
Definition Params.h:42
What a container does with a component beyond the component's own members (decisions....
Definition Component.h:104

Detailed Description

The distribution that a container of several holds one of per element (decisions.md [component-first], [params-and-density]): a Mixture's component, a Hybrid's conditional given a mode.

Gaussian is one, and so is Hybrid, so a mixture of hybrid states is a Mixture too. A component is named by the type that evaluates (Gaussian and Hybrid, not GaussianParams and HybridParams), and the container stores its Params.

Its parameters have the space and dimension contract of a Gaussian [sizes-and-dimensions], factorize with factorize(), and have a ComponentTraits specialization for the log-density read from that factorization without a check, for the moments, and for the collapse of several components into one by moment matching.

The contract is closed (decisions.md [user-extension-points]): a component is one of the library's, since the traits encode the collapse, which a wrong specialization would corrupt silently, and a type derived from a component isn't one, its Params and Density round trip landing on the base. What a user keeps per component lives beside the mixture instead (MixtureLineage::carry()), and what a user does to a component is a recursion of the user's own (Filters/Recursion.h).