ClosenessCentrality
How close a vertex of a Graph is, on average, to every other vertex it can reach.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
ClosenessCentrality✓ClosenessCentrality(g)every vertex's closeness centrality, in VertexList(g) order.ClosenessCentrality(g, v)just v's closeness centrality.Typed signatures
| Type | Package | Applies |
|---|---|---|
(value, any?) -> list<number> | number | combinatorics | always |
Details
- Defined as (r - 1) / (sum of distances from v to those r - 1 vertices), where r is the number of vertices reachable from v INCLUDING v itself -- restricting to the reachable set rather than treating a disconnected graph as an error. 0 for a vertex with nothing reachable.
- Distances respect edge direction, same as GraphDistance (out-distances from v). Kernel-unverified against a live Wolfram session -- see the PR notes for the exact formula chosen.
Examples
About
| Examples | 2 |
|---|---|
| Checked against | Wolfram Language 1 agree1 unevaluated |
| Crosswalk | Wolfram Language |
See also: EigenvectorCentrality, GraphDistance