radius#

radius(G, e=None, usebounds=False)[source]#

Returns the radius of the graph G.

The radius is the minimum eccentricity.

Parameters:
GNetworkX graph

A graph

eeccentricity dictionary, optional

A precomputed dictionary of eccentricities.

Returns:
rinteger

Radius of graph

Examples

>>> G = nx.Graph([(1, 2), (1, 3), (1, 4), (3, 4), (3, 5), (4, 5)])
>>> nx.radius(G)
2