11#ifndef TLX_MATH_AGGREGATE_MIN_MAX_HEADER
12#define TLX_MATH_AGGREGATE_MIN_MAX_HEADER
26template <
typename Type_>
76 template <
typename Archive>
86 Type max_ = std::numeric_limits<Type>::lowest();
Calculate running aggregate statistics: feed it with values, and it will keep the minimum and the max...
AggregateMinMax operator+(const AggregateMinMax &a) const noexcept
operator + to combine two AggregateMinMax<>
AggregateMinMax(const Type &min, const Type &max) noexcept
initializing constructor
const Type & min() const noexcept
return minimum over all values aggregated
AggregateMinMax()=default
default constructor
AggregateMinMax & add(const Type &value) noexcept
add a value to the running aggregation
void serialize(Archive &archive)
serialization method for cereal.
Type span() const noexcept
return maximum - minimum over all values aggregated
AggregateMinMax & operator+=(const AggregateMinMax &a) noexcept
operator += to combine two AggregateMinMax<>
const Type & max() const noexcept
return maximum over all values aggregated
void set_max(const Type &v) noexcept
change currently aggregated minimum
void set_min(const Type &v) noexcept
change currently aggregated minimum
static uint32_t min(uint32_t x, uint32_t y)