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

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents beb8a3f4a345
children
rev   line source
samer@0 1 % arrf - Creat functional arrow using a function factory
samer@0 2 %
samer@0 3 % arrf ::
samer@27 4 % FF: (SZ -> (A@typelist(N)->B@typelist(M))) ~'function to create function from sizes',
samer@0 5 % N: natural ~'number of inputs',
samer@0 6 % M: natural ~'number of outputs',
samer@0 7 % options {}
samer@27 8 % -> arrow(A@typelist(N),B@typelist(M),empty).
samer@0 9 %
samer@0 10 % The type empty denotes the type of empty arrays, ie
samer@0 11 % the state of an arr arrow is always an empty matrix.
samer@0 12
samer@0 13 function o=arrf(ffn,nin,nout,varargin)
samer@37 14 opts=options('sizefn',[],varargin{:});
samer@0 15 o=class(struct('fn',ffn,'sizefn',opts.sizefn),'arrf',arrow(nin,nout));
samer@0 16 end