EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
InfoFilter.h
Go to the documentation of this file.
1#pragma once
2
8
9#include <utility>
10
18
19namespace Emrys
20{
21
51template <
52 Space Space_,
53 typename Model_,
54 typename Method_ = DefaultMethodFor<Model_>,
55 RealScalar Scalar_ = double,
56 typename Upkeep_ = upkeep::None>
58 : public KalmanFilter<
59 InfoGaussian<Space_, Scalar_>,
60 Model_,
61 Method_,
62 KalmanRecursion<InfoGaussian<Space_, Scalar_>, Model_, Method_>,
63 Upkeep_>
64{
65public:
66
69 Model_,
70 Method_,
72 Upkeep_>;
73
79 Model_ model,
82 std::type_identity_t<Upkeep_> upkeep = {}
83 )
84 : Base{std::move(model), std::move(state), std::move(method), std::move(upkeep)}
85 {}
86
90 InfoFilter(Model_ model, InfoGaussianParams<Space_, Scalar_> state, std::type_identity_t<Upkeep_> upkeep)
91 requires(!std::same_as<Upkeep_, Emrys::upkeep::None>)
92 : Base{std::move(model), std::move(state), MethodFor<Model_, Method_>{}, std::move(upkeep)}
93 {}
94};
95
97// One guide with a defaulted method, its parameters in the class's order.
98template <typename Space, typename Model, typename Method = DefaultMethodFor<Model>, typename Scalar>
99 requires(!internal::UpkeepArgument<Method>)
100InfoFilter(Model, InfoGaussianParams<Space, Scalar>, Method = {})
101 -> InfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, Method, Scalar>;
102
103template <typename Space, typename Model, typename Scalar, typename U>
104 requires internal::UpkeepArgument<U>
105InfoFilter(Model, InfoGaussianParams<Space, Scalar>, U)
106 -> InfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, DefaultMethodFor<Model>, Scalar, U>;
107
108template <typename Space, typename Model, typename Method, typename Scalar, typename U>
109InfoFilter(Model, InfoGaussianParams<Space, Scalar>, Method, U)
110 -> InfoFilter<Space, internal::BoundStep<Model, Space, Scalar>, Method, Scalar, U>;
112
113} // namespace Emrys
114
115#ifndef EMRYS_FILTER_NO_IO
116
117namespace Emrys
118{
119
120namespace internal
121{
122
124template <typename Space_, typename Model_, typename Method_, typename Scalar_, typename Upkeep_>
125void
126describe(std::ostream & stream, InfoFilter<Space_, Model_, Method_, Scalar_, Upkeep_> const & filter, Indent indent)
127{
128 describeFilter(stream, "information filter", filter.state(), indent);
129}
130
131} // namespace internal
132
133} // namespace Emrys
134
135#endif // EMRYS_FILTER_NO_IO
Spaces built from other spaces (decisions.md [sizes-and-dimensions], [several-resizable-blocks]): Com...
The information form of the Gaussian (decisions.md [gaussian-forms]): its parameters InfoGaussianPara...
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...
InfoFilter(Model_ model, InfoGaussianParams< 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 InfoFilter.h:78
InfoFilter(Model_ model, InfoGaussianParams< Space_, Scalar_ > state, std::type_identity_t< Upkeep_ > upkeep)
A filter with process model model, initial state state, the default prediction method,...
Definition InfoFilter.h:90
KalmanFilter< InfoGaussian< Space_, Scalar_ >, Model_, Method_, KalmanRecursion< InfoGaussian< Space_, Scalar_ >, Model_, Method_ >, Upkeep_ > Base
the filter this is
Definition InfoFilter.h:67
A Gaussian kept as its precision and information vector, about a reference value.
Definition InfoGaussian.h:74
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
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< InfoGaussianParams< Space_, Scalar_ > > InfoGaussian
The Gaussian in information form, which evaluates its density: what InfoGaussianParams::toDensity() r...
Definition InfoGaussian.h:761
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