Mercurial > hg > ishara
view arrows/@erate/erate.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 5de03f77dae1 |
children |
line wrap: on
line source
% erate - Drive sub-arrow at event rate, ie when events arrive % % erate :: arrow(A@typelist(N),B@typelist(M),S), % -> arrow(events(A), events(B),S). % % the type events(A) denotes a list of types where each % type is a boxed version of the the corresponding type in A. % The boxed type boxed(A) is either {} (no-event) or {A}, % (event with data of type A). If the encapsulated arrow has % multiple inputs, the arrow is fired only if all inputs % receive an event simultaneously. The arrow must have at % least one input. function o=erate(a,sizes_in) s.base=a; s.sizes_in=sizes_in; if nargin(a)<1, error('erate arrow must have at least 1 input'); end o=class(s,'erate',arrow(nargin(a),nargout(a))); end