tmTopRange#

swordfish.function.tmTopRange()#

For each element Xi in a sliding window of X, count the continuous nearest neighbors to its left that are smaller than Xi. Null values are treated as the minimum values.

Parameters:
  • T (Constant) – A non-strictly increasing vector of temporal or integral type. It cannot contain null values.

  • X (Constant) – A vector of the same size as T.

  • window (Constant) – A scalar of positive integer or DURATION type indicating the size of the sliding window.