EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::UpkeepOperation Concept Reference

An upkeep operation on a State: an action or a trigger, the library's or the caller's own, a function object called as operation(state) that returns whether it changed the state, or the NumericError that stopped it, a WeightError or a GaussianError (decisions.md [upkeep], [user-extension-points]). More...

#include <EmrysFilter/Distributions/Upkeep.h>

Concept definition

template<typename T, typename State>
concept UpkeepOperation = requires(T const & operation, State & state) {
{ operation(state) } -> std::same_as<std::expected<bool, NumericError>>;
}
An upkeep operation on a State: an action or a trigger, the library's or the caller's own,...
Definition Upkeep.h:368

Detailed Description

An upkeep operation on a State: an action or a trigger, the library's or the caller's own, a function object called as operation(state) that returns whether it changed the state, or the NumericError that stopped it, a WeightError or a GaussianError (decisions.md [upkeep], [user-extension-points]).

A trigger runs any of them. What else an operation needs, such as a generator, it holds.

Each of the library's operations is constrained on the members of the state it calls, and a trigger on its predicate and on each of its actions being an UpkeepOperation of the state, so the concept answers whether an operation applies to a state, and a call on a state it doesn't apply to fails at the call.