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