MinMaxAccumulator class
MinMaxAccumulator
computes minimum and maximum values of a sequence of values.
Samples are added one by one or two by two, using the Push
method. Other members are used to retrieve the results.
It is possible to accumulate samples in different objects (e.g. when processing with multiple threads),
and add the accumulators together using the +
operator.
Functions
- void Reset()
- Reset the accumulator, leaving it as if newly allocated.
- void Push(dip::dfloat x)
- Add a sample to the accumulator
- void Push(dip::dfloat x, dip::dfloat y)
- Add two samples to the accumulator. Prefer this over adding one value at the time.
- auto Minimum() const -> dip::dfloat
- Minimum value seen so far
- auto Maximum() const -> dip::dfloat
- Maximum value seen so far
Operators
- auto operator+=(dip::MinMaxAccumulator const& other) -> dip::MinMaxAccumulator&
- Combine two accumulators