Compute closeness centrality for nodes.
Closeness centrality at a node is 1/average distance to all other nodes.
Parameters: | G : graph
v : node, optional
weighted_edges : bool, optional
|
---|---|
Returns: | nodes : dictionary
|
See also
betweenness_centrality, load_centrality, eigenvector_centrality, degree_centrality
Notes
The closeness centrality is normalized to to n-1 / size(G)-1 where n is the number of nodes in the connected part of graph containing the node. If the graph is not completely connected, this algorithm computes the closeness centrality for each connected part separately.