Struct normalize_base_fn

Inheritance Relationships

Derived Type

Struct Documentation

struct normalize_base_fn

Implementation detail for a normalize range adaptor object.

Subclassed by beluga::actions::detail::normalize_fn

Public Functions

template<class ExecutionPolicy, class Range, 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, double factor) const -> Range&

Overload that implements the normalize algorithm.

Template Parameters:
Parameters:
  • policy – The execution policy to use.

  • range – An existing range to apply this action to.

  • factor – The normalization factor.

template<class ExecutionPolicy, class Range, 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) const -> Range&

Overload that uses a default normalization factor.

The default normalization factor is the total sum of weights.

template<class Range, class ExecutionPolicy, std::enable_if_t<ranges::range<Range>, int> = 0, std::enable_if_t<std::is_execution_policy_v<ExecutionPolicy>, int> = 0>
inline constexpr auto operator()(Range &&range, double factor, ExecutionPolicy policy) const -> Range&

Overload that re-orders arguments from an action closure.

template<class Range, class ExecutionPolicy, std::enable_if_t<ranges::range<Range>, int> = 0, std::enable_if_t<std::is_execution_policy_v<ExecutionPolicy>, int> = 0>
inline constexpr auto operator()(Range &&range, ExecutionPolicy policy) const -> Range&

Overload that re-orders arguments from an action closure.

template<class ExecutionPolicy, std::enable_if_t<std::is_execution_policy_v<ExecutionPolicy>, int> = 0>
inline constexpr auto operator()(ExecutionPolicy policy, double factor) const

Overload that returns an action closure to compose with other actions.

template<class ExecutionPolicy, std::enable_if_t<std::is_execution_policy_v<ExecutionPolicy>, int> = 0>
inline constexpr auto operator()(ExecutionPolicy policy) const

Overload that returns an action closure to compose with other actions.