NetworkX

Previous topic

networkx.numeric_assortativity

Next topic

networkx.degree_pearsonr

networkx.neighbor_connectivity

neighbor_connectivity(G)

Compute neighbor connectivity of graph.

The neighbor connectivity is the average nearest neighbor degree of a node of degree k.

Parameters:

G : NetworkX graph

Returns:

d: dictionary :

A dictionary keyed by degree k with the value of average neighbor degree.

Examples

>>> G=nx.cycle_graph(4)
>>> nx.neighbor_connectivity(G)
{2: 2.0}
>>> G=nx.complete_graph(4)
>>> nx.neighbor_connectivity(G)    
{3: 3.0}