Esempio n. 1
0
def computeNodeBetweennessCDF(gr):
    numnodes = gr.getNumNodes()
    nbs = algorithms.importance.betweenness_centrality.getNodeBetnSeq(gr)
    return distribution.computeCDF(nbs, 0, numnodes * (numnodes - 1), numnodes)
Esempio n. 2
0
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))
Esempio n. 3
0
def computeEdgeConnectivityCDF(gr):
    econ = robustness.robustness_measures.getConnSeq(gr)
    return distribution.computeCDF(econ, 1, max(econ), len(econ))
Esempio n. 4
0
def computeOutdegreeCDF(gr):
    numnodes = gr.getNumNodes()
    ds = algorithms.importance.degree_centrality.getOutDegSeq(gr)
    return distribution.computeCDF(ds, 0, numnodes - 1, numnodes)