[Networkit] properties graph density
christian.staudt at kit.edu
Fri Mar 20 13:24:50 CET 2015
you are right, thanks for pointing this out. I’ve fixed the bug in the latest Dev version. Classic example of user feedback being essential for developing correct software.
On 19 Mar 2015, at 17:21, Damiano Rossato <damiano_rossato at alice.it> wrote:
> 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 --------------
A non-text attachment was scrubbed...
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the NetworKit