Process models side by side, as compose() puts them (decisions.md [model-policies], [model-placement]): one model whose reads are the union of the parts', gathered once, whose writes are the parts' together, which must write every block of the state once, whose noise is block-diagonal, and whose affine set is the names every part reading them declares affine.
More...
#include <EmrysFilter/Models/ProcessModel.h>
|
|
using | Scalar = typename internal::FirstScalarOr<internal::DeclaredScalarsOf<Models...>>::type |
| | the scalar type: the one its parts state, or double where none states one
|
|
using | FunctionType = Composition |
| | the function: the composition itself
|
|
using | ReadsPolicy = typename internal::ReadUnionOf<AllItems>::type |
| | The reads() of the whole: the union of the parts', in order of first appearance.
|
|
using | WritesPolicy = typename internal::WritesOfTuple<AllPaths, AllNames>::type |
| | The writes() of the whole: the parts', in order.
|
|
using | AffinePolicy = typename internal::AffineOf<ReadsPolicy, std::tuple<Models...>>::type |
| | The affineIn() of the whole.
|
| template<internal::PolicyKind K> |
| using | Policy |
| | The policy of kind K, or internal::NoPolicy.
|
|
using | WritePaths = typename WritesPolicy::PathList |
| | The paths of the blocks written, a TagPaths.
|
|
using | OutputSpace = typename WritesPolicy::OutputSpace |
| | The output space: the Composite of the blocks written, in order.
|
|
using | MarkType = internal::NoJacobians |
| | The whole writes no Jacobian in a batch: a method that needs one differentiates it.
|
|
|
| Composition (Models... models) |
| | The composition of models.
|
| Composition const & | function () const |
| template<internal::PolicyKind K> |
| Policy< K > const & | policy () const |
| std::tuple< Models... > const & | parts () const |
template<typename In, typename Out, typename X, typename TimeScalar>
requires MatrixExpression<X> |
| auto | operator() (In const &in, Out const &out, X const &x, TimeScalar dt) const |
template<typename In, typename Out, typename X, typename TimeScalar, typename Y>
requires TakesBatches |
| void | operator() (In const &in, Out const &out, X const &x, TimeScalar dt, Y &y) const |
| | Writes into y the whole's step of a batch x, a column per point in the input space in, into the output space out over dt: each batched part called once over its columns, and each other part at each column (internal::stepPartsBatch()).
|
| template<typename Scalar, typename Out> |
| Moments< Out, Scalar >::MatrixType | noiseOver (Out const &out, Scalar dt) const |
| template<typename Space> |
| bool | partitions (Space const &space) const |
|
| template<typename Space> |
| static consteval internal::StaticPartition | staticPartition () |
|
|
static constexpr bool | IsModel = true |
| | a model, for internal::isModel
|
|
static constexpr bool | HasFunction = true |
| | a process model always has a function
|
| template<internal::PolicyKind K> |
| static constexpr bool | has |
| | Whether the policy of kind K is one the whole has: reads(), writes(), and affineIn().
|
|
static constexpr bool | TakesBatches = internal::anyTakesBatches<Models...> |
| | whether the whole takes a batch: a part's function does (decisions.md [batched-functions])
|
template<typename... Models>
class Emrys::Composition< Models >
Process models side by side, as compose() puts them (decisions.md [model-policies], [model-placement]): one model whose reads are the union of the parts', gathered once, whose writes are the parts' together, which must write every block of the state once, whose noise is block-diagonal, and whose affine set is the names every part reading them declares affine.
Each part's function is called on its own input, gathered from the whole's by name, and its result is written into the whole's output by block. When every part returns its Jacobian the composition does too, assembled from theirs; otherwise the whole is differentiated. The parts that state a scalar, as the built-in models do, state the same one, which is the composition's; a composition of parts that state none, such as Constant, has double.
- Template Parameters
-
- See also
- compose(), processModel()
◆ Policy
template<typename... Models>
template<internal::PolicyKind K>
Initial value:std::conditional_t<
K == internal::PolicyKind::reads,
std::conditional_t<
K == internal::PolicyKind::writes,
std::conditional_t<K == internal::PolicyKind::affineIn, AffinePolicy, internal::NoPolicy>>>
typename internal::ReadUnionOf< AllItems >::type ReadsPolicy
The reads() of the whole: the union of the parts', in order of first appearance.
Definition ProcessModel.h:1836
typename internal::WritesOfTuple< AllPaths, AllNames >::type WritesPolicy
The writes() of the whole: the parts', in order.
Definition ProcessModel.h:1839
The policy of kind K, or internal::NoPolicy.
◆ function()
template<typename... Models>
- Returns
- the function: the composition itself
◆ noiseOver()
template<typename... Models>
template<typename
Scalar, typename Out>
- Returns
- the process noise \( Q \) over dt, over the differences of the output space instance out: block-diagonal, each part's over its own blocks
◆ operator()()
template<typename... Models>
template<typename In, typename Out, typename X, typename TimeScalar>
requires MatrixExpression<X>
| auto Emrys::Composition< Models >::operator() |
( |
In const & | in, |
|
|
Out const & | out, |
|
|
X const & | x, |
|
|
TimeScalar | dt ) const |
|
inlinenodiscard |
- Returns
- the whole's step of x, a vector in the input space in, into the output space out over dt: each part's function on its own input, its result written by block, and the Jacobian assembled from the parts' when every part returns one
◆ partitions()
template<typename... Models>
template<typename Space>
- Returns
- whether the whole writes every coordinate of space exactly once
◆ parts()
template<typename... Models>
- Returns
- the parts, in order
◆ policy()
template<typename... Models>
template<internal::PolicyKind K>
- Returns
- the policy of kind K, which the whole must have
◆ staticPartition()
template<typename... Models>
template<typename Space>
|
|
inlinestaticnodiscardconsteval |
- Returns
- what the types say about whether the whole writes every coordinate of Space exactly once (internal::StaticPartition)
◆ has
template<typename... Models>
template<internal::PolicyKind K>
Initial value: =
K == internal::PolicyKind::reads || K == internal::PolicyKind::writes || K == internal::PolicyKind::affineIn
Whether the policy of kind K is one the whole has: reads(), writes(), and affineIn().
The documentation for this class was generated from the following file: