diameter of a graph
[d,p] = graph_diameter(g)
integer
integer row vector
graph_diameter
computes the diameter of the graph g
i.e. the
largest shortest path between two nodes. The length of the arcs are
supposed to be integer (and the default value is 1). The output is the value
d
of the length of
the diameter and p
is the corresponding path.
Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.