Simple C++  min/max peak detector for 1-D data.