Formula: C_C(v) = (r - 1) / sum_{u reachable} d(v, u)
References
Sabidussi (1966) for the sum-distance form and Freeman (1979), Centrality in social networks: conceptual clarification, Social Networks 1:215-239, for the (n-1)-normalised measure. Freeman's article is paywalled; the normalisation C(v) = (n-1)/sum_u d(v,u) is as restated in the centrality literature that cites him.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Clocent(V)
#> $closeness
#> [1] NA 1 1 1 1 1 1 1
#>
#> $reachable
#> [1] 1 8 8 8 8 8 8 8
#>
#> $total_distance
#> [1] 0 7 7 7 7 7 7 7
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Closeness centrality"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
