Close
Close window
ClosenessCentrality - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

GraphTheory

ClosenessCentrality

compute closeness centrality

Calling Sequence

ClosenessCentrality(G)

ClosenessCentrality(G, v)

Parameters

G

-

graph

v

-

(optional) a vertex of G

Description

ClosenessCentrality returns the closeness centrality for a specified vertex in the given graph G, or if no vertex is specified, returns a list of the closeness centralities for each vertex in G.

The closeness centrality of a vertex v is the reciprocal of the average graph distance between v and every vertex reachable from v.

Examples

>

withGraphTheory:

Compute the closeness centrality for a specified graph.

>

GGraph6,1,3,1,6,2,4,2,6,3,6,4,5,4,6,5,6

GGraph 1: an undirected graph with 6 vertices and 8 edges

(1)
>

DrawGraphG

>

ClosenessCentralityG

58,58,58,57,58,1

(2)

Compatibility

The GraphTheory[ClosenessCentrality] command was introduced in Maple 2020.

For more information on Maple 2020 changes, see Updates in Maple 2020 .


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /