@graphty/algorithms / index / nodeDegreeCentrality
Function: nodeDegreeCentrality() ​
nodeDegreeCentrality(
graph,nodeId,options):number
Defined in: algorithms/centrality/degree.ts:67
Calculate degree centrality for a specific node
Parameters ​
graph ​
The input graph to analyze
nodeId ​
The node to calculate centrality for
string | number
options ​
CentralityOptions = {}
Algorithm configuration options
Returns ​
number
The degree centrality score for the node