Skip to content

strata::Min

Part of Reductions.

struct strata::Min;

The smallest value, by < alone, so that any ordered type will do.

A NaN is the result wherever there is one, as in NumPy: whatever the order the values come in. There is no identity: of no values at all it is a precondition violation.

Members

accumulator

template <typename T>
using strata::Min::accumulator = T

What the reducer keeps while values come in: a value.

init

template <typename T>
constexpr T init(const T &first) const

Starts from the first value.

accumulate

template <typename T>
constexpr T accumulate(T acc, const T &value) const

The smaller of acc and value; a NaN value wins.

combine

template <typename T>
constexpr T combine(T lhs, const T &rhs) const

The smaller of two partial results.

finalize

template <typename T>
constexpr T finalize(T acc, std::size_t) const

The accumulator itself, whatever the count.