https://github.com/lemire/runningmaxmin
Fast maximum-minimum filters implemented in C++
https://github.com/lemire/runningmaxmin
algorithms maximum minimum
Last synced: 11 months ago
JSON representation
Fast maximum-minimum filters implemented in C++
- Host: GitHub
- URL: https://github.com/lemire/runningmaxmin
- Owner: lemire
- License: other
- Created: 2014-02-20T19:20:27.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T00:01:24.000Z (about 3 years ago)
- Last Synced: 2025-03-18T01:11:24.068Z (11 months ago)
- Topics: algorithms, maximum, minimum
- Language: C++
- Size: 38.1 KB
- Stars: 44
- Watchers: 2
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fast running maximum-minimum filters implemented in C++.
==========================================================
[](https://travis-ci.org/lemire/runningmaxmin)
This code implements the algorithms described in the following paper:
Daniel Lemire, [Streaming Maximum-Minimum Filter Using No More than
Three Comparisons per Element](http://arxiv.org/abs/cs.DS/0610046). Nordic Journal of Computing, 13 (4), pages 328-339, 2006.
Contributors: Daniel Lemire, Kai Wolf
The main algorithm presented in this package is used in [Apache Hive](https://github.com/apache/hive).
Usage
-----
To reproduce the numbers from the paper, do the following:
```
make
./unit
./runningmaxmin --sine 1000000 10000 --windowrange 4 100 --times 1
./runningmaxmin --white 1000000 --windowrange 4 100 --times 1
```
Suitability
------------
The new algorithm introduced in the manuscript is most suitable for piecewise monotonic
data or when low-latency is required. Otherwise, Gil-Kimmel and van Herk
are good choices.
See also
---------
- Julia version: streaming maximum-minimum filter implementation in Julia https://github.com/sairus7/MaxMinFilters.jl
- For a Python version, see https://github.com/lemire/pythonmaxmin
- For an application of this idea to rolling statistics in JavaScript, see https://github.com/shimondoodkin/efficient-rolling-stats
- For an application in Go, please see https://github.com/notnot/movingminmax
- Another C++ library: STL Monotonic Wedge https://github.com/EvanBalster/STL_mono_wedge