set_large(n) --- set the cut off size for large graphs. set_large --- with no arguments, this returns the current threhold between "small" and "large". At construction, graphs on n or fewer vertices are considered "small" and are given full storage; otherwise, the graphs are "large" and given sparse storage.
0001 function sz = set_large(n) 0002 % set_large(n) --- set the cut off size for large graphs. 0003 % set_large --- with no arguments, this returns the current threhold 0004 % between "small" and "large". 0005 % 0006 % At construction, graphs on n or fewer vertices are considered "small" and 0007 % are given full storage; otherwise, the graphs are "large" and given 0008 % sparse storage. 0009 0010 if ~graph_system_exists 0011 error('Graph system not initialized') 0012 end 0013 0014 global GRAPH_MAGIC 0015 0016 if nargin==0 0017 sz = GRAPH_MAGIC.large_size; 0018 return 0019 end 0020 0021 if (n<1) 0022 n = 1000; 0023 end 0024 0025 GRAPH_MAGIC.large_size = n; 0026 sz = n;