view arrows/asubsample.m @ 2:7357e1dc2ad6

Simplified scheduler library with new schedule representation.
author samer
date Sat, 22 Dec 2012 16:17:51 +0000
parents 672052bd81f8
children
line wrap: on
line source
% asubsample - Arrow to subsample input sequence.
%
% asubsample :: natural -> arrow({A},{box(A)},natural).
function o=asubsample(N)
	o=loop(@barrier,@(sz)0);
	function [y,s]=barrier(x,s)
		if s==0, y={x}; s=N-1;
		else s=s-1; y={}; end
	end
end