Home > matgraph > @graph > diam.m

diam

PURPOSE ^

diam(g) --- return the diameter of g: the length of a longest shortest

SYNOPSIS ^

function d = diam(g)

DESCRIPTION ^

 diam(g) --- return the diameter of g: the length of a longest shortest
 path in g, or Inf if g is not connected.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function d = diam(g)
0002 % diam(g) --- return the diameter of g: the length of a longest shortest
0003 % path in g, or Inf if g is not connected.
0004 
0005 d = max(max(dist(g)));

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