[Networkit] properties graph density

Damiano Rossato damiano_rossato at alice.it
Thu Mar 19 17:21:43 CET 2015

I found a simple bug in the "properties.py" file about density measure. Now that NetworKit supports directed graph, 
density measure must be update in accord to density formulas (http://en.wikipedia.org/wiki/Dense_graph). Am I wrong?
Now density is:

def density(G):
    """ Return the density of the graph"""
    (n, m) = size(G)
    return (2 * m) / (n * (n-1))

but for directed graph, must be m/(n*(n-1))

I hope to have been useful. Have a nice day


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150319/17cc4168/attachment.html>

More information about the NetworKit mailing list