EmrysFilter
0.1.0
State estimation utilities in C++23 using Eigen
Toggle main menu visibility
Loading...
Searching...
No Matches
Recursion.h
Go to the documentation of this file.
1
#pragma once
2
10
11
#include <concepts>
12
13
#include <
EmrysFilter/Core/Math.h
>
14
#include <
EmrysFilter/Distributions/Params.h
>
15
#include <
EmrysFilter/Spaces/Space.h
>
16
17
namespace
Emrys
18
{
19
72
template
<
typename
R>
73
concept
Recursion
=
RealScalar<typename R::Scalar>
&&
Space<typename R::SpaceType>
&&
requires
(R
const
& recursion) {
74
typename
R::StateType;
75
typename
R::ModelType;
76
typename
R::MethodType;
77
{ R::Reentrant } -> std::convertible_to<bool>;
78
{ recursion.model() } -> std::same_as<typename R::ModelType const &>;
79
{ recursion.method() } -> std::same_as<typename R::MethodType const &>;
80
};
81
86
template
<
typename
R,
typename
Component_>
87
concept
RecursionOver
=
Recursion<R>
&& std::same_as<typename R::StateType, Params<Component_>>;
88
89
namespace
internal
90
{
91
97
struct
UpdateAccess
98
{
100
template
<
typename
Update>
101
[[nodiscard]]
static
auto
&
102
logLikelihood
(Update &
update
)
103
{
104
return
update
.m_logLikelihood;
105
}
106
108
template
<
typename
Update>
109
[[nodiscard]]
static
auto
&
110
posteriorEnds(Update &
update
)
111
{
112
return
update
.m_posteriorEnds;
113
}
114
};
115
116
}
// namespace internal
117
118
}
// namespace Emrys
Math.h
Mathematical constants and scalar functions that work in every scalar type the library accepts,...
Params.h
Params and Density: the traits that pair a distribution's parameters with its density,...
Space.h
The Space concept and what every continuous space shares (decisions.md [sizes-and-dimensions]): the t...
Emrys::RealScalar
A type usable as the scalar of a distribution: a real number type such as float, double,...
Definition
Math.h:80
Emrys::RecursionOver
A Recursion whose steps act on the parameters of the component Component_, the constraint a filter ov...
Definition
Recursion.h:87
Emrys::Recursion
A recursion: a filter without its state, acting in place on a state passed in (decisions....
Definition
Recursion.h:73
Emrys::Space
A type usable as the space of a distribution.
Definition
Space.h:186
Emrys::logLikelihood
Derived::Scalar logLikelihood(M const &measurement, Space const &space, Eigen::MatrixBase< Derived > const &x)
Definition
Likelihood.h:433
Emrys::update
std::expected< CategoricalUpdate< Space, Scalar >, WeightError > update(CategoricalParams< Space, Scalar > const &prior, E const &emission)
Definition
Emission.h:97
EmrysFilter
Filters
Recursion.h
Generated by
1.18.0