where ei is the number of edges in community i and ni is the number of nodes in community i.
Returns
A named numerical vector, where the names are community IDs and the numbers are link densities.
References
Ahn, Y.Y., Bagrow, J.P., and Lehmann, S. (2010). Link communities reveal multiscale complexity in networks. Nature 466 , 761-764.
Kalinka, A.T. and Tomancak, P. (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27 , 2011-2012.