Mercurial > hg > ishara
annotate sequences/@seq/window.m @ 19:1eb0ea29ec40
Doesn't belong here.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:32:19 +0000 |
parents | 3f77126f7b5f |
children | b1280319413e |
rev | line source |
---|---|
samer@3 | 1 % window - Window a sequnce of arrays in a given dimension |
samer@3 | 2 % |
samer@3 | 3 % window :: seq [[N,M]] -> seq [[N]]. |
samer@3 | 4 % window :: seq [[N,M]], L:natural -> seq [[N,L]]. |
samer@3 | 5 % window :: seq [[N,M]], L:natural, natural ~'hop size' -> seq [[N,L]]. |
samer@3 | 6 % |
samer@3 | 7 % This is just short for windowdata(...) |
samer@3 | 8 % Possible optimisation: |
samer@3 | 9 % when the span and hop are much less than the input buffer size |
samer@3 | 10 % and the source data does not have an efficient extract method, |
samer@3 | 11 % then it is worth caching the source data, ie window(cache(x),...) |
samer@3 | 12 function Y=window(X,varargin), Y=seq.window(X,varargin{:}); |