Code covered by the BSD License  

Highlights from
Matgraph

from Matgraph by Ed Scheinerman
Toolbox for working with simple, undirected graphs

Description of display
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:
  • isfull isfull(g) --- check if g's adjacency matrix is full
  • ne ne(g) --- number of edges in g or ne(g,h) --- check for inequality
  • nv nv(g) --- number of vertices in g
This function is called by:
  • cayley cayley(g,perms) -- create a Cayley graph (undirected)

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

Contact us at files@mathworks.com