Home > matgraph > @graph > display.m

display

PURPOSE ^

display(g) --- display basic information about a graph object

SYNOPSIS ^

function display(g)

DESCRIPTION ^

 display(g) --- display basic information about a graph object

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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, ')'])

Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003