Distances are counted in steps (weights are not taken), along edges'
directions when dir = TRUE (out-distances). A disconnected graph is
handled in the two standard ways, both returned: cls and ncls count
only the nodes a node reaches (as igraph::closeness() does), so a node
close to the few it reaches scores high; hrm, the harmonic centrality,
sums 1 / distance over every other node, an unreachable one adding 0,
so reaching more nodes always scores more. Graph rules as in ntdeg().
Value
A data frame: node, reach (nodes reached), cls (1 / the
summed distance to them), ncls (reach / that sum, the inverse mean
distance; cls and ncls are NaN when nothing is reached) and hrm
(the harmonic centrality).
References
Freeman, L. C. (1978). Centrality in social networks: conceptual clarification. Social Networks, 1(3), 215-239. doi:10.1016/0378-8733(78)90021-7
Marchiori, M. and Latora, V. (2000). Harmony in the small-world. Physica A, 285(3-4), 539-546. doi:10.1016/S0378-4371(00)00311-3