|
template<std::floating_point T, stats Stats = stats::variance, std::random_access_iterator I, typename F = std::identity>
requires concepts::arithmetic_projection<F, std::iter_value_t<I>> |
| auto | accumulate (I first, I last, F &&f=F {}) noexcept -> univariate_statistics |
| |
template<std::floating_point T, stats Stats = stats::variance, std::random_access_iterator I, std::random_access_iterator J, typename F = std::identity>
requires concepts::arithmetic_projection<F, std::iter_value_t<I>> |
| and std::is_arithmetic_v< std::iter_value_t< J > > auto | accumulate (I first1, I last1, J first2, F &&f=F {}) noexcept -> univariate_statistics |
| |
template<std::floating_point T, stats Stats = stats::variance, nan_policy Policy = nan_policy::propagate, std::random_access_iterator I, std::random_access_iterator J, typename BinaryOp , typename F1 = std::identity, typename F2 = std::identity>
requires std::is_invocable_v<F1, std::iter_value_t<I>> |
| and std::is_invocable_v< F2, std::iter_value_t< J > > and std::is_invocable_v< BinaryOp, std::invoke_result_t< F1, std::iter_value_t< I > >, std::invoke_result_t< F2, std::iter_value_t< J > > > and concepts::arithmetic_projection< BinaryOp, std::invoke_result_t< F1, std::iter_value_t< I > >, std::invoke_result_t< F2, std::iter_value_t< J > > > auto | accumulate (I first1, I last1, J first2, BinaryOp &&op=BinaryOp {}, F1 &&f1=F1 {}, F2 &&f2=F2 {}) noexcept -> std::conditional_t< Policy==nan_policy::omit, std::pair< univariate_statistics, std::size_t >, univariate_statistics > |
| |
template<std::floating_point T, stats Stats = stats::variance, nan_policy Policy = nan_policy::propagate, std::random_access_iterator I, std::random_access_iterator J, std::random_access_iterator K, typename BinaryOp , typename F1 = std::identity, typename F2 = std::identity>
requires std::is_arithmetic_v<std::iter_value_t<K>> && std::is_invocable_v<F1, std::iter_value_t<I>> && std::is_invocable_v<F2, std::iter_value_t<J>> && std::is_invocable_v<BinaryOp, std::invoke_result_t<F1, std::iter_value_t<I>>, std::invoke_result_t<F2, std::iter_value_t<J>>> && concepts::arithmetic_projection<BinaryOp, std::invoke_result_t<F1, std::iter_value_t<I>>, std::invoke_result_t<F2, std::iter_value_t<J>>> |
| auto | accumulate (I first1, I last1, J first2, K first3, BinaryOp &&op=BinaryOp {}, F1 &&f1=F1 {}, F2 &&f2=F2 {}) noexcept -> std::conditional_t< Policy==nan_policy::omit, std::pair< univariate_statistics, std::size_t >, univariate_statistics > |
| |
Methods for univariate statistics.
template<std::floating_point T, stats Stats = stats::variance, nan_policy Policy = nan_policy::propagate, std::random_access_iterator I, std::random_access_iterator J, typename BinaryOp , typename F1 = std::identity, typename F2 = std::identity>
requires std::is_invocable_v<F1, std::iter_value_t<I>>
| and std::is_invocable_v< F2, std::iter_value_t< J > > and std::is_invocable_v< BinaryOp, std::invoke_result_t< F1, std::iter_value_t< I > >, std::invoke_result_t< F2, std::iter_value_t< J > > > and concepts::arithmetic_projection< BinaryOp, std::invoke_result_t< F1, std::iter_value_t< I > >, std::invoke_result_t< F2, std::iter_value_t< J > > > auto accumulate |
( |
I |
first1, |
|
|
I |
last1, |
|
|
J |
first2, |
|
|
BinaryOp && |
op = BinaryOp {}, |
|
|
F1 && |
f1 = F1 {}, |
|
|
F2 && |
f2 = F2 {} |
|
) |
| -> std::conditional_t<Policy == nan_policy::omit, std::pair<univariate_statistics, std::size_t>, univariate_statistics>
|
|
inlinenoexcept |
Accumulates over the projected values from applying BinaryOp on the input sequences.
- Template Parameters
-
| T | The scalar value type underlying the eve::wide<T> SIMD type used to compute the stats |
| Stats | Which stats to compute |
| Policy | nan_policy::propagate (default): a non-finite projected value poisons the whole result, like the rest of this library. nan_policy::omit: positions where either raw input is non-finite are skipped (zero-weighted) instead, and the count of skipped pairs is additionally returned. |
| BinaryOp | Binary projection \(op(a,b) \to c\) |
| F1 | Unary projection \(f(x_1) \to a\) |
| F2 | Unary projection \(f(x_2) \to b\) |
- Parameters
-
| first1 | The begin iterator for the first sequence |
| last1 | The end iterator for the first sequence |
| first2 | The begin iterator for the second sequence |
| op | A binary projection mapping a tuple \((f_1(\cdot),
f_2(\cdot))\) to a scalar value |
| f1 | A projection mapping std::iter_value_t<I> to a scalar value |
| f2 | A projection mapping std::iter_value_t<J> to a scalar value |
- Returns
nan_policy::propagate: the accumulated statistics. nan_policy::omit: the accumulated statistics over finite pairs, and the count of skipped (non-finite) pairs.
template<std::floating_point T, stats Stats = stats::variance, std::random_access_iterator I, std::random_access_iterator J, typename F = std::identity>
requires concepts::arithmetic_projection<F, std::iter_value_t<I>>
| and std::is_arithmetic_v< std::iter_value_t< J > > auto accumulate |
( |
I |
first1, |
|
|
I |
last1, |
|
|
J |
first2, |
|
|
F && |
f = F {} |
|
) |
| -> univariate_statistics
|
|
inlinenoexcept |
Accumulates a sequence of (projected) values.
- Template Parameters
-
| T | The scalar value type underlying the eve::wide<T> SIMD type used to compute the stats. |
- Parameters
-
| first1 | The begin iterator for the first sequence |
| last1 | The end iterator for the first sequence |
| first2 | The begin iterator for the second (weights) sequence |
| f | A projection mapping std::iter_value_t<I> to a scalar value |
template<std::floating_point T, stats Stats = stats::variance, nan_policy Policy = nan_policy::propagate, std::random_access_iterator I, std::random_access_iterator J, std::random_access_iterator K, typename BinaryOp , typename F1 = std::identity, typename F2 = std::identity>
requires std::is_arithmetic_v<std::iter_value_t<K>> && std::is_invocable_v<F1, std::iter_value_t<I>> && std::is_invocable_v<F2, std::iter_value_t<J>> && std::is_invocable_v<BinaryOp, std::invoke_result_t<F1, std::iter_value_t<I>>, std::invoke_result_t<F2, std::iter_value_t<J>>> && concepts::arithmetic_projection<BinaryOp, std::invoke_result_t<F1, std::iter_value_t<I>>, std::invoke_result_t<F2, std::iter_value_t<J>>>
| auto accumulate |
( |
I |
first1, |
|
|
I |
last1, |
|
|
J |
first2, |
|
|
K |
first3, |
|
|
BinaryOp && |
op = BinaryOp {}, |
|
|
F1 && |
f1 = F1 {}, |
|
|
F2 && |
f2 = F2 {} |
|
) |
| -> std::conditional_t<Policy == nan_policy::omit, std::pair<univariate_statistics, std::size_t>, univariate_statistics>
|
|
inlinenoexcept |
Weighted variant of accumulate (BinaryOp overload): folds a caller-supplied weight in, and (under nan_policy::omit) into the finite mask (‘w’ = finite ? w : 0`) instead of a flat 0/1 weight.
- Parameters
-
| first3 | The begin iterator for the caller-supplied weights |