Skip to content

@graphty/algorithms / index / betweennessCentrality

Function: betweennessCentrality() ​

betweennessCentrality(graph, options): Record<string, number>

Defined in: algorithms/centrality/betweenness.ts:204

Calculate betweenness centrality for all nodes using Brandes' algorithm

Parameters ​

graph ​

Graph

The input graph to analyze

options ​

BetweennessCentralityOptions = {}

Algorithm configuration options

Returns ​

Record<string, number>

Centrality scores for each node keyed by node ID