annotate arrows/@agraph/agraph.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 % agraph - Base arrow class for graphics in a Matlab figure
samer@0 2 %
samer@0 3 % agraph ::
samer@0 4 % N:natural ~'number of inputs',
samer@0 5 % options {
samer@0 6 % fig :: handle / gcf ~'figure for this instance';
samer@0 7 % autoflush :: boolean/1 ~'unit will call drawnow after every iteration'
samer@0 8 % }
samer@27 9 % -> agraph(N) < arrow(_@typelist(N),{},_).
samer@0 10 %
samer@0 11 % METHODS
samer@0 12 % autoflush :: agraph(_) -> boolean.
samer@0 13 % fig :: agraph(_) -> handle.
samer@0 14 %
samer@0 15 % This class is no use instantiated directly. Should be subclassed.
samer@0 16 function o=agraph(nin,varargin)
samer@37 17 s.opts=options('fig',[],'name','','autoflush',0,varargin{:});
samer@0 18 if isempty(s.opts.fig), warning('agraph requires figure'); end
samer@0 19 o=class(s,'agraph',arrow(nin,0));
samer@0 20 end
samer@0 21