def computeNodeBetweennessCDF(gr): numnodes = gr.getNumNodes() nbs = algorithms.importance.betweenness_centrality.getNodeBetnSeq(gr) return distribution.computeCDF(nbs, 0, numnodes * (numnodes - 1), numnodes)
def computePLCDF(gr, interval): clsv = algorithms.importance.closeness_centrality.getClosenessVectors(gr) cls = [] for v in clsv.values(): cls.extend(v) return distribution.computeCDF(cls, 0, max(cls), interval, len(cls))
def computeEdgeConnectivityCDF(gr): econ = robustness.robustness_measures.getConnSeq(gr) return distribution.computeCDF(econ, 1, max(econ), len(econ))
def computeOutdegreeCDF(gr): numnodes = gr.getNumNodes() ds = algorithms.importance.degree_centrality.getOutDegSeq(gr) return distribution.computeCDF(ds, 0, numnodes - 1, numnodes)