Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

Small-world

Functions for estimating the small-world-ness of graphs.

A small world network is characterized by a small average shortest path length, and a large clustering coefficient.

Small-worldness is commonly measured with the coefficient sigma or omega.

Both coefficients compare the average clustering coefficient and shortest path length of a given graph against the same quantities for an equivalent random or lattice graph.

For more information, see the Wikipedia article on small-world network 1.

1

Small-world network:: https://en.wikipedia.org/wiki/Small-world_network

random_reference(G[, niter, connectivity, seed])

Compute a random graph by swapping edges of a given graph.

lattice_reference(G[, niter, D, …])

Latticize the given graph by swapping edges.

sigma(G[, niter, nrand, seed])

Returns the small-world coefficient (sigma) of the given graph.

omega(G[, niter, nrand, seed])

Returns the small-world coefficient (omega) of a graph