annotate arrows/@aparallel/aparallel.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 5de03f77dae1
children
rev   line source
samer@0 1 % aparallel - Parallel application of arrows to multiple inputs
samer@0 2 %
samer@0 3 % aparallel ::
samer@27 4 % arrow( A1@typelist(N1), B1@typelist(M1), C1) ~'arrow with N1 inputs, M1 outputs',
samer@27 5 % arrow( A2@typelist(N2), B2@typelist(M2), C2) ~'arrow with N2 inputs, M2 outputs',
samer@0 6 % -> arrow( [A1,A2], [B1,B2],cell {C1,C2}) ~'arrow with N1+N2 ins, M1+M2 outs'.
samer@0 7 %
samer@0 8 % The list of inputs of the second arrow is concatenated to those
samer@0 9 % of the first. Ditto the ouputs. State is cell array pair of
samer@0 10 % states of the two component arrows.
samer@0 11
samer@0 12 function o=aparallel(a1,a2)
samer@0 13 s.a1=a1;
samer@0 14 s.a2=a2;
samer@0 15 o=class(s,'aparallel',arrow(nargin(a1)+nargin(a2),nargout(a1)+nargout(a2)));
samer@0 16 end