[graph-tool] vertex average problem

Snehal Shekatkar snehalshekatkar at gmail.com
Sat Oct 8 12:44:28 CEST 2016

Hello all,

Somehow I am getting only a half of the actual value when I try to
calculate the average clustering of the graph. For example, consider the

    G = gt.Graph(directed = False)
    G.add_edge_list([(0, 1), (0, 2), (1, 2)])

    clust = gt.local_clustering(G)
    C_ave = gt.vertex_average(G, clust)

Since the graph is simply an undirected triangle, we should get C_ave = 1.
However, I get C_ave = 0.5. Am I missing something obvious?

Thank you


Snehal Madhukar Shekatkar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20161008/9c3937fb/attachment.htm>

More information about the graph-tool mailing list