Streaming maximum-minimum filter using no more than three comparisons per element

  • Authors:
  • Daniel Lemire

  • Affiliations:
  • University of Quebec at Montreal (UQAM), Montreal, Quebec, Canada

  • Venue:
  • Nordic Journal of Computing
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The running maximum-minimum (MAX-MIN) filter computes the maxima and minima over running windows of size w. This filter has numerous applications in signal processing and time series analysis. We present an easy-to-implement online algorithm requiring no more than 3 comparisons per element, in the worst case. Comparatively, no algorithm is known to compute the running maximum (or minimum) filter in 1.5 comparisons per element, in the worst case. Our algorithm has reduced latency and memory usage.