 HarmonicCentrality - Maple Help

GraphTheory

 HarmonicCentrality
 compute harmonic centrality Calling Sequence HarmonicCentrality(G) HarmonicCentrality(G, v) Parameters

 G - graph v - (optional) a vertex of G Description

 • HarmonicCentrality returns the harmonic centrality for a specified vertex in the given graph G, or if no vertex is specified, returns a list of the harmonic centralities for each vertex in G.
 • The harmonic centrality of a vertex v is the sum of the reciprocal of the graph distance from u to v for every other vertex u in G. Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$

Compute the harmonic centrality for a specified graph.

 > $G≔\mathrm{Graph}\left(6,\left\{\left\{1,3\right\},\left\{1,6\right\},\left\{2,6\right\},\left\{2,4\right\},\left\{3,6\right\},\left\{4,6\right\},\left\{4,5\right\},\left\{5,6\right\}\right\}\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected graph with 6 vertices and 8 edge\left(s\right)}}$ (1)
 > $\mathrm{DrawGraph}\left(G\right)$ > $\mathrm{HarmonicCentrality}\left(G\right)$
 $\left[\frac{{7}}{{2}}{,}\frac{{7}}{{2}}{,}\frac{{7}}{{2}}{,}{4}{,}\frac{{7}}{{2}}{,}{5}\right]$ (2) Compatibility

 • The GraphTheory[HarmonicCentrality] command was introduced in Maple 2020.