示例#1
0
def most_central_edge(G):
    centrality = betweenness(G, weight='weight')
    return max(centrality, key=centrality.get)
示例#2
0
 def most_central_weighted_edge(graph):
     centrality = betweenness(graph, weight='weight')
     return max(centrality, key=centrality.get)
示例#3
0
def most_central_edge(G):
    centrality = betweenness(G, weight='weight')
    #return max(centrality, key=centrality.get)
    return sorted(centrality, key=centrality.get, reverse=True)[:5]
示例#4
0
 def most_central_edge(graph):
     """
     中心度加权
     """
     centrality = betweenness(graph, weight="weight")
     return max(centrality, key=centrality.get)