display(g) --- display basic information about a graph object
0001 function display(g) 0002 % display(g) --- display basic information about a graph object 0003 0004 global GRAPH_MAGIC; 0005 0006 if (~GRAPH_MAGIC.in_use(g.idx)) 0007 disp(['Invalid graph object (index ', int2str(g.idx),')']); 0008 return 0009 end 0010 0011 n = nv(g); 0012 m = ne(g); 0013 0014 if (isfull(g)) 0015 stype = 'full'; 0016 else 0017 stype = 'sparse'; 0018 end 0019 0020 0021 disp(['Graph with ', int2str(n), ' vertices and ', ... 0022 int2str(m),' edges (', stype, ')'])