Thrill
0.1
|
Calculate running aggregate statistics: feed it with values, and it will keep the minimum and the maximum values.
Definition at line 27 of file aggregate_min_max.hpp.
#include <aggregate_min_max.hpp>
Public Types | |
using | Type = Type_ |
Public Member Functions | |
AggregateMinMax ()=default | |
default constructor More... | |
AggregateMinMax (const Type &min, const Type &max) noexcept | |
initializing constructor More... | |
AggregateMinMax & | add (const Type &value) noexcept |
add a value to the running aggregation More... | |
const Type & | max () const noexcept |
return maximum over all values aggregated More... | |
const Type & | min () const noexcept |
return minimum over all values aggregated More... | |
AggregateMinMax | operator+ (const AggregateMinMax &a) const noexcept |
operator + to combine two AggregateMinMax<> More... | |
AggregateMinMax & | operator+= (const AggregateMinMax &a) noexcept |
operator += to combine two AggregateMinMax<> More... | |
template<typename Archive > | |
void | serialize (Archive &archive) |
serialization method for cereal. More... | |
void | set_max (const Type &v) noexcept |
change currently aggregated minimum More... | |
void | set_min (const Type &v) noexcept |
change currently aggregated minimum More... | |
Type | span () const noexcept |
return maximum - minimum over all values aggregated More... | |
Private Attributes | |
Type | max_ = std::numeric_limits<Type>::lowest() |
maximum value More... | |
Type | min_ = std::numeric_limits<Type>::max() |
minimum value More... | |
using Type = Type_ |
Definition at line 30 of file aggregate_min_max.hpp.
|
default |
default constructor
Referenced by AggregateMinMax< Type_ >::operator+().
|
inlinenoexcept |
initializing constructor
Definition at line 36 of file aggregate_min_max.hpp.
|
inlinenoexcept |
add a value to the running aggregation
Definition at line 40 of file aggregate_min_max.hpp.
References max(), AggregateMinMax< Type_ >::max_, min(), AggregateMinMax< Type_ >::min_, and gen_data::value.
|
inlinenoexcept |
return maximum over all values aggregated
Definition at line 50 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::max_.
|
inlinenoexcept |
return minimum over all values aggregated
Definition at line 47 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::min_.
|
inlinenoexcept |
operator + to combine two AggregateMinMax<>
Definition at line 62 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::AggregateMinMax(), max(), AggregateMinMax< Type_ >::max_, min(), and AggregateMinMax< Type_ >::min_.
|
inlinenoexcept |
operator += to combine two AggregateMinMax<>
Definition at line 69 of file aggregate_min_max.hpp.
References max(), AggregateMinMax< Type_ >::max_, min(), and AggregateMinMax< Type_ >::min_.
|
inline |
serialization method for cereal.
Definition at line 77 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::max_, and AggregateMinMax< Type_ >::min_.
|
inlinenoexcept |
change currently aggregated minimum
Definition at line 59 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::max_.
|
inlinenoexcept |
change currently aggregated minimum
Definition at line 56 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::min_.
|
inlinenoexcept |
return maximum - minimum over all values aggregated
Definition at line 53 of file aggregate_min_max.hpp.
References AggregateMinMax< Type_ >::max_, and AggregateMinMax< Type_ >::min_.
maximum value
Definition at line 86 of file aggregate_min_max.hpp.
Referenced by AggregateMinMax< Type_ >::add(), AggregateMinMax< Type_ >::max(), AggregateMinMax< Type_ >::operator+(), AggregateMinMax< Type_ >::operator+=(), AggregateMinMax< Type_ >::serialize(), AggregateMinMax< Type_ >::set_max(), and AggregateMinMax< Type_ >::span().
minimum value
Definition at line 83 of file aggregate_min_max.hpp.
Referenced by AggregateMinMax< Type_ >::add(), AggregateMinMax< Type_ >::min(), AggregateMinMax< Type_ >::operator+(), AggregateMinMax< Type_ >::operator+=(), AggregateMinMax< Type_ >::serialize(), AggregateMinMax< Type_ >::set_min(), and AggregateMinMax< Type_ >::span().