EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Methods.h File Reference

The transform methods, as policies made by their factories (decisions.md [policy-factories], [method-per-measurement], [affine-coordinates], [returned-jacobians], [iterated-update], [sigma-point-sets], [user-extension-points]): methods::linearized(), unscented(), fourthMomentUnscented(), cubature(), sphericalSimplex(), gaussHermite(), spread(), and iterated(); the UnscentedRule and PointSet concepts a rule or a point set of the user's own meets; the TransformMethod concept observe() requires of its method; and withJacobian() for a function that knows its Jacobian. More...

#include <array>
#include <cmath>
#include <concepts>
#include <cstddef>
#include <limits>
#include <tuple>
#include <type_traits>
#include <utility>
#include <Eigen/Eigenvalues>
#include <EmrysFilter/Core/Forwarding.h>
#include <EmrysFilter/Core/Macros.h>
#include <EmrysFilter/Core/Math.h>
#include <EmrysFilter/Distributions/Roots.h>
#include <EmrysFilter/Spaces/TagPath.h>

Go to the source code of this file.

Classes

struct  Emrys::WithJacobian< Value, Jacobian >
 What a function returns when it knows its Jacobian: its value, and the Jacobian of its output differences in its uncertain inputs' differences, at the same point (decisions.md [returned-jacobians]). More...
struct  Emrys::UnscentedParams< Scalar >
 The parameters of the scaled unscented transform over a number of coordinates, in Scalar, as an UnscentedRule gives them: \( \lambda = \alpha^2 (L + \kappa) - L \). More...
struct  Emrys::methods::Linearized
 Linearized method: \( \bar y = f(\mu) \) and \( \Sigma_{yy} = \sum_i J_i \Sigma_i J_i^T \), with the Jacobians \( J_i \) of f at the input means. More...
struct  Emrys::methods::Unscented< Alpha, Beta, Kappa >
 Unscented method: \( 2L + 1 \) sigma points over the joint input space of dimension \( L \), spread by \( \lambda = \alpha^2 (L + \kappa) - L \). More...
struct  Emrys::methods::FourthMomentUnscented
 Unscented method with \( \alpha = 1 \), \( \beta = 0 \), and \( \kappa = 3 - L \) over \( L \) coordinates, so that \( L + \lambda = 3 \): the points sit at \( \sqrt 3 \) standard deviations along each column of the root whatever \( L \) is, and their fourth moment along each column is a Gaussian's, 3. More...
struct  Emrys::methods::Cubature
 Cubature method: the \( 2L \) points \( \mu \boxplus \pm \sqrt{L} \, S_j \) over the joint input space of dimension \( L \), for each column \( S_j \) of a root of the joint covariance, equally weighted by \( 1 / (2L) \), with no center point and no parameter. More...
struct  Emrys::methods::SphericalSimplex< CenterWeight >
 Spherical simplex method: \( L + 2 \) points over the joint input space of dimension \( L \), the mean with weight centerWeight \( W_0 \) and \( L + 1 \) points of weight \( (1 - W_0) / (L + 1) \) on a sphere of radius \( \sqrt{L / (1 - W_0)} \) about it, in the coordinates of a root of the joint covariance. More...
struct  Emrys::methods::GaussHermite< Order >
 Gauss-Hermite method: the product rule of Order points per coordinate over the joint input space of dimension \( L \), \( \mathrm{Order}^L \) points in the coordinates of a root of the joint covariance. More...
struct  Emrys::methods::Spread< Rule, A >
 A sigma-point rule spread by axes of its own (decisions.md [sigma-point-axes]): Rule's unit points and weights, an UnscentedRule or a PointSet, carried into the input by the root A takes (Axes), in place of the default, roots::cholesky(roots::pivoted()). More...
struct  Emrys::IteratedOptions< Scalar >
 The run-time settings of an Iterated method, given to methods::iterated() as iterated(method, {.tolerance = 1e-6}): what stops the iteration, in the scalar the method holds (decisions.md [policy-factories]). More...
struct  Emrys::methods::Iterated< Method, Scalar >
 Iterated method, for a measurement update: the update of Method relinearized with respect to its own posterior, with the prior held fixed, until the mean stops moving. More...

Namespaces

namespace  Emrys::methods
 The transform methods and the sigma-point rules, each made by its factory (decisions.md [policy-factories], [method-per-measurement]): linearized(), unscented(), cubature(), sphericalSimplex(), gaussHermite(), and iterated().

Concepts

concept  Emrys::UnscentedRule
 A rule for the scaled unscented transform's parameters by the number of coordinates it spreads its points over: a method that places Unscented's \( 2L + 1 \) points with Unscented's weights, at the \( \alpha \), \( \beta \), and \( \kappa \) it gives for each \( L \).
concept  Emrys::PointSet
 A set of sigma points other than Unscented's: a method that evaluates a function at weighted points given in the coordinates of a root of the covariance, with one weight per point for the mean and the covariance alike.
concept  Emrys::TransformMethod
 A method observe() can take: Linearized, an UnscentedRule (Unscented, FourthMomentUnscented, or one of the user's own), a PointSet (Cubature, SphericalSimplex, GaussHermite, or one of the user's own), or an Iterated one of them.

Functions

template<typename Value, typename Jacobian>
WithJacobian< internal::PlainResult< std::remove_cvref_t< Value > >, internal::PlainResult< std::remove_cvref_t< Jacobian > > > Emrys::withJacobian (Value &&value, Jacobian &&jacobian)
constexpr Linearized Emrys::methods::linearized ()
template<double Alpha = 1.0, double Beta = 2.0, double Kappa = 0.0>
constexpr Unscented< Alpha, Beta, Kappa > Emrys::methods::unscented ()
constexpr FourthMomentUnscented Emrys::methods::fourthMomentUnscented ()
constexpr Cubature Emrys::methods::cubature ()
template<double CenterWeight = 0.0>
constexpr SphericalSimplex< CenterWeight > Emrys::methods::sphericalSimplex ()
template<int Order = 3>
constexpr GaussHermite< Order > Emrys::methods::gaussHermite ()
template<typename Rule, typename A>
constexpr Spread< Rule, A > Emrys::methods::spread (Rule rule, A axes)
template<RealScalar Scalar = double, typename Method = Linearized>
Iterated< Method, Scalar > Emrys::methods::iterated (Method method={}, IteratedOptions< Scalar > options={})

Variables

constexpr int Emrys::MaxPointCount = 4096
 The most points a PointSet may have over a fixed number of coordinates, which bounds the compile-time size of its matrices: a transform by a set of more is refused at compile time, and a GaussHermite rule of more by an assertion over a dynamic number of coordinates too.

Detailed Description

The transform methods, as policies made by their factories (decisions.md [policy-factories], [method-per-measurement], [affine-coordinates], [returned-jacobians], [iterated-update], [sigma-point-sets], [user-extension-points]): methods::linearized(), unscented(), fourthMomentUnscented(), cubature(), sphericalSimplex(), gaussHermite(), spread(), and iterated(); the UnscentedRule and PointSet concepts a rule or a point set of the user's own meets; the TransformMethod concept observe() requires of its method; and withJacobian() for a function that knows its Jacobian.

What each method computes is in Transform.h. Read TransformArgs.h next.