[Networkit] properties graph density

Christian Staudt christian.staudt at kit.edu
Fri Mar 20 13:24:50 CET 2015

Hi Damiano,
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:

> Hi,
> 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
> Damiano
> <ATT00001.c>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150320/5bb938ce/attachment.sig>

More information about the NetworKit mailing list