def computeEdgeBetweennessEntropy(gr): numedges = gr.getNumEdges() numnodes = gr.getNumNodes() ebs = algorithms.importance.betweenness_centrality.getEdgeBetnSeq(gr) ebd = distribution.computeDistribution(ebs, 0, numnodes * (numnodes - 1), numedges) return entropy.computeEntropy(ebd)
def computePLEntropy(gr, interval): return entropy.computeEntropy(computePLDistribution(gr, interval))
def computeEdgeConnectivityEntropy(gr): return entropy.computeEntropy(computeEdgeConnectivityDistribution(gr))
def computeOutdegreeDistributionEntropy(gr): numnodes = gr.getNumNodes() ds = algorithms.importance.degree_centrality.getOutDegSeq(gr) dd = distribution.computeDistribution(ds, 0, numnodes - 1, numnodes) return entropy.computeEntropy(dd)