NetworkX

Previous topic

networkx.algorithms.mixing.numeric_assortativity

Next topic

networkx.algorithms.mixing.degree_pearsonr

networkx.algorithms.mixing.neighbor_connectivity

networkx.algorithms.mixing.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}