Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/structural.properties.R
Cloness centrality measures how many steps is required to access every other vertex from a given vertex.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
graph |
The graph to analyze. |
vids |
The vertices for which closeness will be calculated. |
mode |
Character string, defined the types of the paths used for measuring the distance in directed graphs. “in” measures the paths to a vertex, “out” measures paths from a vertex, all uses undirected paths. This argument is ignored for undirected graphs. |
weights |
Optional positive weight vector for calculating weighted
closeness. If the graph has a |
normalized |
Logical scalar, whether to calculate the normalized closeness. Normalization is performed by multiplying the raw closeness by n-1, where n is the number of vertices in the graph. |
cutoff |
The maximum path length to consider when calculating the betweenness. If zero or negative then there is no such limit. |
The closeness centrality of a vertex is defined by the inverse of the average length of the shortest paths to/from all the other vertices in the graph:
1/sum( d(v,i), i != v)
If there is no (directed) path between vertex \code{v} and \code{i} then the total number of vertices is used in the formula instead of the path length.
estimate_closeness
only considers paths of length cutoff
or
smaller, this can be run for larger graphs, as the running time is not
quadratic (if cutoff
is small). If cutoff
is zero or negative
then the function calculates the exact closeness scores.
Numeric vector with the closeness values of all the vertices in
v
.
Gabor Csardi csardi.gabor@gmail.com
Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. Social Networks, 1, 215-239.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.