fvec_peakpick method

int fvec_peakpick(
  1. Pointer<fvec_t> v,
  2. int p
)

return 1 if vp is a peak and positive, 0 otherwise

This function returns 1 if a peak is found at index p in the vector v. The peak is defined as follows:

  • vp is positive
  • vp-1 < vp
  • vp > vp+1

\param v input vector \param p position of supposed for peak

\return 1 if a peak is found, 0 otherwise

Implementation

int fvec_peakpick(
  ffi.Pointer<fvec_t> v,
  int p,
) {
  return _fvec_peakpick(
    v,
    p,
  );
}