Mercurial > hg > ishara
view arrows/emerge.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
% emerge - Arrow to merge event inputs % % emerge :: N:natural ~'number of inputs' % -> arrow({[N]->boxed(A)},{boxed(A)},empty). % % Inputs are event streams, ie values of type boxed(A), % which are cell arrays of values of type A. % Output is an event stream consisting of all events % merged into one stream. If multiple events arrive % at one time, the output cell array will contain more % than one value. function o=emerge(nin) o=arr(@merge); function y=merge(varargin), y=cat(2,varargin{1:nin}); end end