annotate arrows/@aswitch/aswitch.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 % aswitch - switching arrow
|
samer@0
|
2 %
|
samer@0
|
3 % aswitch ::
|
samer@27
|
4 % arrow(A@typelist(N),B@typelist(M),S)
|
samer@0
|
5 % -> arrow([A,{box(arrow(A,B,S))}], B,S).
|
samer@0
|
6 %
|
samer@0
|
7 % The resulting arrow has N+1 inputs and M outputs. The last input
|
samer@0
|
8 % is for boxed arrows, that is, a stream of events consisting of
|
samer@0
|
9 % arrows. When a new arrow arrives, the aswitch arrow starts behaving
|
samer@0
|
10 % like it.
|
samer@0
|
11
|
samer@0
|
12 function o=aswitch(a)
|
samer@0
|
13 s.base=a;
|
samer@0
|
14 o=class(s,'aswitch',arrow(nargin(a)+1,nargout(a)));
|
samer@0
|
15 end
|