Struct likelihoods_fn
Defined in File likelihoods.hpp
Struct Documentation
-
struct likelihoods_fn
Implementation detail for the likelihoods range adaptor object.
This struct follows the common C++ standard library pattern for creating a customizable function object. We define a global constexpr instance of this struct, which makes the view easy to use and compose.
Public Functions
-
template<class Model>
inline constexpr auto operator()(Model model) const Creates a view that computes the likelihood for each particle in a source range.
- Template Parameters:
Model – A callable type that takes a particle’s state and returns its likelihood (e.g., a double or float).
- Parameters:
model – An instance of the sensor model callable.
- Returns:
A range adaptor closure. When this closure is applied to a range of particles, it returns a new lazy-evaluated view containing the likelihoods.
-
template<class Model>