30 m_minMax({std::numeric_limits< double >::max(), -std::numeric_limits< double >::max()}) {}
33 void reset() {
m_minMax = {std::numeric_limits< double >::max(), -std::numeric_limits< double >::max()}; }
38 bool wasAdded =
false;
50 std::string min =
m_minMax.first == std::numeric_limits< double >::max() ?
"max<double>" : std::to_string(
m_minMax.first);
51 std::string max =
m_minMax.second == -std::numeric_limits< double >::max() ?
"min<double>" : std::to_string(
m_minMax.second);
52 return "min: " + min +
", max: " + max;
small class for storing min and max.
std::pair< double, double > m_minMax
.first is min, .second is .max.
bool checkAndReplaceIfMinMax(double newVal)
checks value and replaces old ones if new one is better.
double getMin() const
returns smallest value stored so far.
std::string print() const
print function returning results for min and max as a string.
void reset()
reset to start values.
double getMax() const
returns biggest value stored so far.
MinMax()
constructor, starts with max for min and min for max (will later be replaced by valid entries).
Abstract base class for different kinds of events.