@graphty/algorithms / index / indexed / degreeCentrality
Function: degreeCentrality() ​
degreeCentrality(
s,options?):F64
Defined in: indexed/degree.ts:39
Degree centrality: each node's number of distinct neighbours (in, out, or both on a directed snapshot), optionally divided by n - 1. Equals the legacy degreeCentrality on every graph it can hold, and on a multigraph equals it on the same graph with each pair's parallel edges merged.
Parameters ​
s ​
GraphSnapshot
The snapshot
options? ​
Direction and normalisation
Returns ​
F64
One score per node index