degree_centrality#

degree_centrality(graph)#

Computes the degree centrality of all nodes in the graph. The values are normalized by dividing each result with the maximum possible degree. Graphs with self-loops can have values of centrality greater than 1.

Parameters:

graph (GraphView) – The graph view on which the operation is to be performed.

Returns:

Mapping of nodes to their associated degree centrality.

Return type:

NodeStateF64