Skip to content

@graphty/algorithms / index / degreeCentrality

Function: degreeCentrality() ​

degreeCentrality(graph, options): CentralityResult

Defined in: algorithms/centrality/degree.ts:17

Calculate degree centrality for all nodes in the graph

Parameters ​

graph ​

Graph

The input graph to analyze

options ​

CentralityOptions = {}

Algorithm configuration options

Returns ​

CentralityResult

Centrality scores for each node keyed by node ID