networkx/networkx — pull request #1055 by FedericoV (2014-01-29 09:29:47+00:00)
Title: [WIP]Small world coefficient

This adds the small world coefficient, as described in:

Humphries MD, Gurney K (2008)
Network ‘Small-World-Ness’: A Quantitative Method for Determining Canonical
Network Equivalence.
PLoS ONE 3(4): e0002051. doi:10.1371/journal.pone.0002051

This PR depends on my other PR for directed clustering coefficient, when calculating small worldness for directed graphs. This PR also contains a small helper function, average_distance_weakly_connected to calculate the average shortest path across weakly connected graphs.

I could use some feedback here since the small world coefficient is defined in relation to random networks - this makes it somewhat expensive to calculate, and would slow down tests a fair bit. Suggestions for efficient tests?