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