The degreeCentrality of a vertex of a graph is the degree of a vertex divided by 2 times the number of edges of the graph. Intuitively, this number will give a measure of how "central" a vertex is in a graph. In other words, if a vertex has a relatively high degreeCentrality, it is connected to more vertexSet than other vertexSet of G, so it is more central or a bottleneck in the graph. Note that the sum of the degree centralities must be 1.
i1 : L = apply(vertexSet pathGraph 5, i -> degreeCentrality (pathGraph 5, i)) 1 1 1 1 1 o1 = {-, -, -, -, -} 8 4 4 4 8 o1 : List |
i2 : sum L o2 = 1 o2 : QQ |
The object degreeCentrality is a method function.