0

I need to find peaks of the vector of numbers. Do you know C++/C library where I can find function like that? Or could you recommend me some known function?

I need find local maximums (peaks). Not only a max value of the vector.

peter55555
  • 1,413
  • 1
  • 19
  • 36
  • 1
    The first search result for `C++ vector min max` gave a pretty good result. – D Stanley Oct 06 '14 at 20:12
  • I mean PEAKS (S at the end). I wrote about local maximums. Yes. Max value of the vector is a local maximum (it's a peak). I need find more peaks. – peter55555 Oct 06 '14 at 20:27
  • 2
    How do you define peaks? Is it as simple as `(v[n] > v[n-1]) && (v[n] > v[n+1])`? – D Stanley Oct 06 '14 at 20:36
  • 1
    Voted to reopen - peaks are not (necessarily) the same as min/max, rather it is about local maxima/minima – the_mandrill Oct 06 '14 at 22:09
  • I agree with @the_mandrill. The referenced answer solves the absolute maximum and minimum problem, not the local extrema problem. – Zéychin Oct 07 '14 at 13:44

0 Answers0