The sum, over pairs of other nodes, of the share of their shortest paths
that pass through the node (Freeman 1977), by Brandes' algorithm in
O(nodes x edges) time. Paths are counted in steps: weights are tie
strengths, not lengths, and are not taken. An undirected pair is counted
once. Graph rules as in ntdeg().
Arguments
- from, to
Labels of the two ends of each edge: vectors of the same length (zero when
nodesgives every node) with no missing values.- nodes
NULL, or every node's label once: the node order of the results and the way to include isolated nodes.- dir
TRUEfor a directed graph (fromsends a tie toto).- norm
TRUEto divide by the number of pairs of other nodes,(n - 1)(n - 2)directed or(n - 1)(n - 2) / 2undirected, asigraph::betweenness(normalized = TRUE)does;NaNfor fewer than 3 nodes.
References
Brandes, U. (2001). A faster algorithm for betweenness centrality. Journal of Mathematical Sociology, 25(2), 163-177. doi:10.1080/0022250X.2001.9990249
Freeman, L. C. (1977). A set of measures of centrality based on betweenness. Sociometry, 40(1), 35-41. doi:10.2307/3033543