annotate sequences/@seq/window.m @ 3:3f77126f7b5f
First major revision of sequence library, now using classdef form, STILL A BIT BROKEN!
author |
samer |
date |
Wed, 09 Jan 2013 22:22:21 +0000 |
parents |
|
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{:});
|