diff arrows/@aparallel/aparallel.m @ 0:672052bd81f8

Initial partial import.
author samer
date Wed, 19 Dec 2012 22:38:28 +0000
parents
children 5de03f77dae1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/arrows/@aparallel/aparallel.m	Wed Dec 19 22:38:28 2012 +0000
@@ -0,0 +1,16 @@
+% aparallel - Parallel application of arrows to multiple inputs
+%
+% aparallel :: 
+%    arrow( A1:arglist(N1), B1:arglist(M1), C1) ~'arrow with N1 inputs, M1 outputs',
+%	  arrow( A2:arglist(N2), B2:arglist(M2), C2) ~'arrow with N2 inputs, M2 outputs',
+% -> arrow( [A1,A2], [B1,B2],cell {C1,C2})      ~'arrow with N1+N2 ins, M1+M2 outs'.
+%
+% The list of inputs of the second arrow is concatenated to those
+% of the first. Ditto the ouputs. State is cell array pair of
+% states of the two component arrows.
+
+function o=aparallel(a1,a2)
+	s.a1=a1;
+	s.a2=a2;
+	o=class(s,'aparallel',arrow(nargin(a1)+nargin(a2),nargout(a1)+nargout(a2)));
+end