EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::ProcessFunction< F, Policies > Class Template Reference

A process model: a function \( f \) of its input and the step, with the policies that say what it reads, what it writes, and what it is affine in, and its noise (decisions.md [model-policies], [continuous-time-noise]). More...

#include <EmrysFilter/Models/ProcessModel.h>

Public Types

using FunctionType = F
 the function
template<internal::PolicyKind K>
using Policy = typename Set::template Type<K>
 The policy of kind K, or internal::NoPolicy.
using WritePaths = typename internal::ProcessWrites<Whole, Policy<internal::PolicyKind::writes>>::Paths
 The paths of the blocks written, a TagPaths; the whole space for a whole-state model.
using OutputSpace = typename internal::ProcessWrites<Whole, Policy<internal::PolicyKind::writes>>::OutputSpace
 The output space: the Composite of the blocks written, in order; for a whole-state model, which has its state's space as its output, internal::WholeSpace.

Public Member Functions

 ProcessFunction (F function, Policies... policies)
 The model of function with policies.
F const & function () const
template<internal::PolicyKind K>
Policy< K > const & policy () const
std::tuple< Policies... > const & policies () const
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

Static Public Member Functions

template<typename Space>
static consteval internal::StaticPartition staticPartition ()

Static Public Attributes

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 = Set::template has<K>
 Whether the policy of kind K was given.
static constexpr bool Whole = !has<internal::PolicyKind::writes>
 whether the model reads and writes the whole state (decisions.md [whole-state-models])

Detailed Description

template<typename F, typename... Policies>
class Emrys::ProcessFunction< F, Policies >

A process model: a function \( f \) of its input and the step, with the policies that say what it reads, what it writes, and what it is affine in, and its noise (decisions.md [model-policies], [continuous-time-noise]).

processModel() builds one, and the built-in models are ones; a user never spells the type. The function is called as f(in, out, x, dt), f(in, x, dt), or f(x, dt), whichever it takes, with in the instance of the input space that reads() defines, out the instance of the output space that writes() defines, built from the state's blocks, x a vector in in, which it reads with block<Name>(in, x), and dt the step in the filter's scalar (see Time steps); it returns a vector in out, which it may fill block by block from zeros<T>(out), either generic in the scalar of x or with its Jacobian beside it (withJacobian(), decisions.md [returned-jacobians]), rows in out's differences and columns in in's. A function generic in the scalar may take it as its one template parameter, []<typename T>(auto const & in, auto const & out, auto const & x, double dt), which the call supplies (decisions.md [function-scalars]). The next state is the state with the written blocks replaced. A model without reads() and writes() reads and writes the whole state of the filter it is given to, and both spaces are the state's (decisions.md [whole-state-models]).

Template Parameters
Fthe function
Policiesthe policies, each at most once
See also
processModel(), predict(), ProcessModel

Member Function Documentation

◆ function()

template<typename F, typename... Policies>
F const & Emrys::ProcessFunction< F, Policies >::function ( ) const
inlinenodiscard
Returns
the function

◆ noiseOver()

template<typename F, typename... Policies>
template<typename Scalar, typename Out>
Moments< Out, Scalar >::MatrixType Emrys::ProcessFunction< F, Policies >::noiseOver ( Out const & out,
Scalar dt ) const
inlinenodiscard
Returns
the process noise \( Q \) over the step dt, a matrix in Scalar over the differences of the output space instance out: a built-in model's closed form, the spectral densities of continuousNoise() times the step, a fixed \( Q \) from additiveNoise(), or zero

◆ partitions()

template<typename F, typename... Policies>
template<typename Space>
bool Emrys::ProcessFunction< F, Policies >::partitions ( Space const & space) const
inlinenodiscard
Returns
whether the model writes every coordinate of space exactly once, as a whole-state model always does

◆ policies()

template<typename F, typename... Policies>
std::tuple< Policies... > const & Emrys::ProcessFunction< F, Policies >::policies ( ) const
inlinenodiscard
Returns
every policy, as given

◆ policy()

template<typename F, typename... Policies>
template<internal::PolicyKind K>
Policy< K > const & Emrys::ProcessFunction< F, Policies >::policy ( ) const
inlinenodiscard
Returns
the policy of kind K, which the model must have

◆ staticPartition()

template<typename F, typename... Policies>
template<typename Space>
consteval internal::StaticPartition Emrys::ProcessFunction< F, Policies >::staticPartition ( )
inlinestaticnodiscardconsteval
Returns
what the types say about whether the model writes every coordinate of Space exactly once (internal::StaticPartition)

The documentation for this class was generated from the following file: