Mercurial > hg > ishara
annotate arrows/@arrow/arrow.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children | 5de03f77dae1 |
rev | line source |
---|---|
samer@0 | 1 % arrow - Base class for processing unit |
samer@0 | 2 % |
samer@0 | 3 % arrow :: |
samer@0 | 4 % N:natural ~'number of inputs', |
samer@0 | 5 % M:natural ~'number of inputs' |
samer@0 | 6 % -> arrow(T1:arglist(N),T2:arglist(M),_). |
samer@0 | 7 % |
samer@0 | 8 % The arrow(T1,T2,S) type denotes the type of an arrow with N inputs |
samer@0 | 9 % and M outputs when T1 is a list of N types and T2 is list of M types. |
samer@0 | 10 % S is the type of the state of the arrow and can be determined by subclasses, |
samer@0 | 11 % The inputs and outputs then have the types as listed in T1 and T2 |
samer@0 | 12 % respectively. |
samer@0 | 13 % |
samer@0 | 14 % The base arrow class cannot be used without subclassing since |
samer@0 | 15 % any attempt to instantiate the live processing unit will throw |
samer@0 | 16 % an exception. |
samer@0 | 17 % |
samer@0 | 18 % METHODS |
samer@0 | 19 % |
samer@0 | 20 % nargin - number of inputs |
samer@0 | 21 % nargout - number of inputs |
samer@0 | 22 % construct - instantiate live processing unit |
samer@0 | 23 |
samer@0 | 24 |
samer@0 | 25 function o=arrow(nin,nout) |
samer@0 | 26 s.nargin=nin; |
samer@0 | 27 s.nargout=nout; |
samer@0 | 28 o=class(s,'arrow'); |