Persistence1D is a class for finding local extrema and their persistence in one-dimensional data. Local minima and local maxima are extracted, paired, and sorted according to their persistence.
The code runs in O(n log n) time, where n is the number of input points.
The download package comes with extensive documentation and examples.
Project homepage: http://www.mpi-inf.mpg.de/~weinkauf/notes/persistence1d.html
Persistence1D has been written by Yeara Kozlov and Tino Weinkauf, Max Planck Institute for Informatics, Saarbrücken, Germany.
You may use it as you wish, it is in the public domain. If you find it useful, it would be nice to hear from you. Just drop us a line.
git clone https://github.com/zohannn/Persistence1D.git
cd Persistence1D
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
cmake -DCMAKE_BUILD_TYPE=Release ..
make