EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
SqrtInfoFilter.h
Go to the documentation of this file.
1#pragma once
2
8
9#include <utility>
10
18
19namespace Emrys
20{
21
53template <
54 Space Space_,
55 typename Model_,
56 typename Method_ = DefaultMethodFor<Model_>,
57 RealScalar Scalar_ = double,
58 typename Upkeep_ = upkeep::None>
60 : public KalmanFilter<
61 SqrtInfoGaussian<Space_, Scalar_>,
62 Model_,
63 Method_,
64 KalmanRecursion<SqrtInfoGaussian<Space_, Scalar_>, Model_, Method_>,
65 Upkeep_>
66{
67public:
68
72 Model_,
73 Method_,
75 Upkeep_>;
76
82 Model_ model,
85 std::type_identity_t<Upkeep_> upkeep = {}
86 )
87 : Base{std::move(model), std::move(state), std::move(method), std::move(upkeep)}
88 {}
89
94 requires(!std::same_as<Upkeep_, Emrys::upkeep::None>)
95 : Base{std::move(model), std::move(state), MethodFor<Model_, Method_>{}, std::move(upkeep)}
96 {}
97};
98
100// One guide with a defaulted method, its parameters in the class's order.
101template <typename Space, typename Model, typename Method = DefaultMethodFor<Model>, typename Scalar>
102 requires(!internal::UpkeepArgument<Method>)
103SqrtInfoFilter(Model, SqrtInfoGaussianParams<Space, Scalar>, Method = {})
104 -> SqrtInfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, Method, Scalar>;
105
106template <typename Space, typename Model, typename Scalar, typename U>
107 requires internal::UpkeepArgument<U>
108SqrtInfoFilter(Model, SqrtInfoGaussianParams<Space, Scalar>, U)
109 -> SqrtInfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, DefaultMethodFor<Model>, Scalar, U>;
110
111template <typename Space, typename Model, typename Method, typename Scalar, typename U>
112SqrtInfoFilter(Model, SqrtInfoGaussianParams<Space, Scalar>, Method, U)
113 -> SqrtInfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, Method, Scalar, U>;
115
116} // namespace Emrys
117
118#ifndef EMRYS_FILTER_NO_IO
119
120namespace Emrys
121{
122
123namespace internal
124{
125
127template <typename Space_, typename Model_, typename Method_, typename Scalar_, typename Upkeep_>
128void
129describe(std::ostream & stream, SqrtInfoFilter<Space_, Model_, Method_, Scalar_, Upkeep_> const & filter, Indent indent)
130{
131 describeFilter(stream, "square-root information filter", filter.state(), indent);
132}
133
134} // namespace internal
135
136} // namespace Emrys
137
138#endif // EMRYS_FILTER_NO_IO
Spaces built from other spaces (decisions.md [sizes-and-dimensions], [several-resizable-blocks]): Com...
KalmanRecursion and KalmanFilter (decisions.md [templated-measurements] and [filters-and-recursions])...
Mathematical constants and scalar functions that work in every scalar type the library accepts,...
Printing: operator<< and std::formatter for every distribution, every filter (which prints its name a...
Process models as functions with reads and writes (decisions.md [model-policies], [continuous-time-no...
The Space concept and what every continuous space shares (decisions.md [sizes-and-dimensions]): the t...
The square-root information form of the Gaussian (decisions.md [gaussian-forms]): its parameters Sqrt...
Method_ const & method() const
Definition KalmanFilter.h:663
KalmanFilter(Model_ model, Params< Component_ > state, MethodFor< Model_, Method_ > method={}, std::type_identity_t< Upkeep_ > upkeep={})
A filter with process model model, initial state state, prediction method method, and upkeep upkeep,...
Definition KalmanFilter.h:580
StateType const & state() const
Definition KalmanFilter.h:615
Model_ const & model() const
Definition KalmanFilter.h:649
The Kalman filter's steps over one component, without the state: a process model and a prediction met...
Definition KalmanFilter.h:121
SqrtInfoFilter(Model_ model, SqrtInfoGaussianParams< Space_, Scalar_ > state, std::type_identity_t< Upkeep_ > upkeep)
A filter with process model model, initial state state, the default prediction method,...
Definition SqrtInfoFilter.h:93
KalmanFilter< SqrtInfoGaussian< Space_, Scalar_ >, Model_, Method_, KalmanRecursion< SqrtInfoGaussian< Space_, Scalar_ >, Model_, Method_ >, Upkeep_ > Base
the filter this is
Definition SqrtInfoFilter.h:70
SqrtInfoFilter(Model_ model, SqrtInfoGaussianParams< Space_, Scalar_ > state, MethodFor< Model_, Method_ > method={}, std::type_identity_t< Upkeep_ > upkeep={})
A filter with process model model, initial state state, and prediction method method; a fixed-step mo...
Definition SqrtInfoFilter.h:81
A Gaussian kept as an upper-triangular root of its precision and a whitened offset,...
Definition SqrtInfoGaussian.h:69
A type usable as the scalar of a distribution: a real number type such as float, double,...
Definition Math.h:80
A type usable as the space of a distribution.
Definition Space.h:186
FormGaussian< SqrtInfoGaussianParams< Space_, Scalar_ > > SqrtInfoGaussian
The Gaussian in square-root information form, which evaluates its density: what SqrtInfoGaussianParam...
Definition SqrtInfoGaussian.h:612
typename internal::DefaultMethodOf< Model >::type DefaultMethodFor
The prediction method of a filter with process model Model, unless it is given one: Linearized,...
Definition ProcessModel.h:3220
std::conditional_t< isFixedStep< Model >, ModelsMethod, Method > MethodFor
The type of a filter constructor's method argument: Method, or ModelsMethod for a fixed-step Model,...
Definition ProcessModel.h:3236
The upkeep operations, each made by its factory (decisions.md [policy-factories], [upkeep]): the acti...
Definition Upkeep.h:380
The upkeep a filter holds when it is given none: it takes any state, changes nothing,...
Definition Upkeep.h:889