@graphty/algorithms / index / edgeBetweennessCentrality
Function: edgeBetweennessCentrality() ​
edgeBetweennessCentrality(
s,options?):EdgeScoresResult
Defined in: indexed/betweenness.ts:285
Edge betweenness centrality by Brandes' algorithm, one score per logical edge.
On a directed snapshot an edge's score equals the legacy edgeBetweennessCentrality value keyed "source-target". On an undirected one it is the number of pairs whose shortest paths cross the edge in either direction, which is the SUM of the two values the legacy function reports under "u-v" and "v-u" (each of those holds half), and is the score the WebGPU accelerator returns.
Parameters ​
s ​
GraphSnapshot
The snapshot
options? ​
Normalisation, sampling and the alive-edge mask
Returns ​
One score per logical edge
Throws ​
RangeError for a bad sources or k, or an alive mask shorter than the edge count