Struct reweight_fn
Defined in File reweight.hpp
Struct Documentation
-
struct reweight_fn
Implementation detail for a reweight range adaptor object.
Public Functions
-
template<class ExecutionPolicy, class Range, class Input, std::enable_if_t<std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>, int> = 0, std::enable_if_t<ranges::range<Range>, int> = 0>
inline constexpr auto operator()(ExecutionPolicy &&policy, Range &range, Input &&input) const -> Range& Primary overload that applies a given range of likelihoods or a model to a particle range.
- Template Parameters:
ExecutionPolicy – An execution policy.
Range – An input range of particles.
Input – Either a LikelihoodRange or a Model callable.
- Parameters:
policy – The execution policy to use.
range – An existing range of particles to apply this action to.
input – A range of likelihood values or a sensor model to calculate them.
-
template<class Range, class Input, std::enable_if_t<ranges::range<Range>, int> = 0, std::enable_if_t<!std::is_execution_policy_v<std::decay_t<Input>>, int> = 0>
inline constexpr auto operator()(Range &range, Input &&input) const -> Range& Convenience overload that defines a default execution policy.
- Parameters:
range – An existing range of particles to apply this action to.
input – A range of likelihood values or a sensor model to calculate them.
-
template<class Range, class Input, class ExecutionPolicy, std::enable_if_t<ranges::range<Range>, int> = 0, std::enable_if_t<std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>, int> = 0>
inline constexpr auto operator()(Range &&range, Input &&input, ExecutionPolicy &&policy) const -> auto& Re-ordering overload to support range-v3 closure argument passing.
This is required to bridge the gap between piped closures and the primary implementation.
-
template<class ExecutionPolicy, class Input, std::enable_if_t<std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>, int> = 0, std::enable_if_t<!ranges::range<std::decay_t<ExecutionPolicy>>, int> = 0>
inline constexpr auto operator()(ExecutionPolicy policy, Input input) const Overload that returns a view closure to compose with other views using an execution policy.
- Parameters:
policy – The execution policy to use.
input – A range of likelihood values or a sensor model to calculate them.
-
template<class Input, std::enable_if_t<!std::is_execution_policy_v<std::decay_t<Input>>, int> = 0>
inline constexpr auto operator()(Input input) const Overload that returns a view closure to compose with other views using the default execution policy.
- Parameters:
input – A range of likelihood values or a sensor model to calculate them.
-
template<class ExecutionPolicy, class Range, class Input, std::enable_if_t<std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>, int> = 0, std::enable_if_t<ranges::range<Range>, int> = 0>