Average Clustering Coefficient Distribution

Hi,

I am interested in computing the distribution of clustering coefficient with
degree, c(k), for a network of mine (c.f. e.g. p. 102 in
dx.doi.org/10.1038/nrg1272 ). Before I go and write a script to calculate
this using the local_clustering method implemented in graph-tool I was
wondering if anybody knew of any methods implemented to this end already?

This is essentially a two-liner:

   c = local_clustering(g)
   h = avg_combined_corr(g, "out", c)

Thank you, that is far more elegant than what I had written.

How does graph-tool handle the clustering coefficient for nodes where k=1?
Does it assume a value of 0 or is it undefined?

attachment.html (6.03 KB)