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

A Gaussian in any of its four forms (decisions.md [gaussian-forms]): GaussianParams, SqrtGaussianParams, InfoGaussianParams, or SqrtInfoGaussianParams, or a GaussianMarginal, the covariance form's marginal, so that a marginal of any form's density is a GaussianForm [form-densities]. More...

#include <EmrysFilter/Distributions/GaussianForm.h>

Concept definition

template<typename G>
concept GaussianForm = requires(G const & g) {
typename G::SpaceType;
typename G::Scalar;
typename G::VectorType;
typename G::MatrixType;
{ G::IsInfoForm } -> std::convertible_to<bool>;
{ G::IsSqrtForm } -> std::convertible_to<bool>;
{ g.space() } -> std::same_as<typename G::SpaceType const &>;
{ g.valueDimension() } -> std::same_as<Eigen::Index>;
{ g.differenceDimension() } -> std::same_as<Eigen::Index>;
{ g.mean() } -> std::convertible_to<std::expected<typename G::VectorType, GaussianError>>;
{ g.covariance() } -> std::same_as<std::expected<typename G::MatrixType, GaussianError>>;
{ g.precision() } -> std::same_as<std::expected<typename G::MatrixType, GaussianError>>;
{ g.covarianceRoot() } -> std::same_as<std::expected<typename G::MatrixType, GaussianError>>;
{ g.precisionRoot() } -> std::same_as<std::expected<typename G::MatrixType, GaussianError>>;
}
A Gaussian in any of its four forms (decisions.md [gaussian-forms]): GaussianParams,...
Definition GaussianForm.h:46

Detailed Description

A Gaussian in any of its four forms (decisions.md [gaussian-forms]): GaussianParams, SqrtGaussianParams, InfoGaussianParams, or SqrtInfoGaussianParams, or a GaussianMarginal, the covariance form's marginal, so that a marginal of any form's density is a GaussianForm [form-densities].

Every form has the same space and dimension contract [sizes-and-dimensions] and the same four fallible accessors, each computed by the cheapest route its form has: covariance(), precision(), covarianceRoot() (a triangular \( S \) with \( S S^T = \Sigma \)), and precisionRoot() (a triangular \( R \) with \( R^T R = \Lambda \)). The roots are lower triangular in the covariance forms and upper triangular in the information forms, the triangle each gets without a second factorization. mean() returns the mean, a reference or, in a marginal, an expression, or a std::expected of it in the information forms, where it is a solve that fails while the precision is singular.