Harary centrality sums the inverse squared shortest-path distances from a node to the other nodes: $$H(i) = \sum_{j \ne i} \frac{1}{d_{ij}^{2}},$$ with \(1/\infty = 0\), so an unreachable node contributes nothing and the score is defined on disconnected networks.
Arguments
- x
Network input accepted by
centrality.- mode
Direction for directed networks:
"all"(default),"out"or"in".- ...
Further arguments to
centrality. The measure usesweighted(defaultTRUE),invert_weights(defaultNULL, which inverts for tna input only),alpha(inversion exponent, default 1) andcutoff(largest distance counted, default -1 for no limit).
Details
Edge weights are read as distances. On regulation_net, whose
weights lie below one, the scores are therefore large.
weighted = FALSE uses hop counts, and invert_weights = TRUE
converts a weight \(w\) to the distance \(1/w^\alpha\).
mode = "all" treats edges as undirected, "out" uses
distances from the node and "in" distances to it. The Harary index
of Plavsic et al. (1993) sums the inverse distances \(1/d_{ij}\);
its node-level form is centrality_harmonic.
References
Plavsic, D., Nikolic, S., Trinajstic, N., & Mihalic, Z. (1993). On the Harary index for the characterization of chemical graphs. Journal of Mathematical Chemistry, 12(1), 235-250. doi:10.1007/BF01164638 .
