You give a summarizing function 𝐹𝑢𝑛𝑐, the data𝐷𝑎𝑡𝑎, and a window span 𝑆𝑝𝑎𝑛.
The result 𝑅 is of length 𝑅ᴺ, 𝑅ᴺ = length(𝐷𝑎𝑡𝑎) - 𝑆𝑝𝑎𝑛 + 1.
- the result omits 𝑅ᴼ = 𝑆𝑝𝑎𝑛 - 1 indices into 𝐷𝑎𝑡𝑎.
-
rolling(function, data, window_span; padding = missing)
-
this will fill the initial result values with the padding value
- pads these values(result[1], .., result[pad_nindices])
-
rolling(function, data, window_span; padding = missing, padlast = true)
-
this will fill the final result values with the padding value
- pads these values(result[n-pad_nindices+1], .., result[n])
- this fills the extra indices with values obtained bycopying
-
this fills the extra indices with values obtained bytrimming
-
trimming evaluates the window function over available data
- trimmed window spans are less than the specified window_span
-
where1 <= 𝓃 < 𝑅ᴼ.
-
this first pads then trims to assign the extra indices
- the first𝓃 indices of the result will match this vector
- the next 𝑅ᴼ - 𝓃 indices of the result will be trimmed
- the remaining indices get the rolled results.