closeness_vitality¶
-
closeness_vitality
(G, weight=None)[source]¶ Compute closeness vitality for nodes.
Closeness vitality of a node is the change in the sum of distances between all node pairs when excluding that node.
Parameters: Returns: nodes – Dictionary with nodes as keys and closeness vitality as the value.
Return type: dictionary
Examples
>>> G=nx.cycle_graph(3) >>> nx.closeness_vitality(G) {0: 4.0, 1: 4.0, 2: 4.0}
See also
closeness_centrality()
References
[1] Ulrik Brandes, Sec. 3.6.2 in Network Analysis: Methodological Foundations, Springer, 2005. http://books.google.com/books?id=TTNhSm7HYrIC