fvec_moving_thres method

double fvec_moving_thres(
  1. Pointer<fvec_t> v,
  2. Pointer<fvec_t> tmp,
  3. int post,
  4. int pre,
  5. int pos,
)

compute moving median threshold of a vector

This function computes the moving median threshold value of at the given position of a vector, taking the median among post elements before and up to pre elements after pos.

\param v input vector \param tmp temporary vector of length post+1+pre \param post length of causal part to take before pos \param pre length of anti-causal part to take after pos \param pos index to compute threshold for

\return moving median threshold value

Implementation

double fvec_moving_thres(
  ffi.Pointer<fvec_t> v,
  ffi.Pointer<fvec_t> tmp,
  int post,
  int pre,
  int pos,
) {
  return _fvec_moving_thres(
    v,
    tmp,
    post,
    pre,
    pos,
  );
}