Skip to content

@graphty/algorithms / index / indexed / katzCentrality

Function: katzCentrality() ​

katzCentrality(s, o?): KatzResult

Defined in: indexed/katz.ts:40

Katz centrality by power iteration over incoming arcs: x[v] = alpha * sum(x[u] for u -> v) + beta.

reverse() supplies the in-arcs, and is the forward adjacency itself on an undirected snapshot, so one loop serves both directions exactly as the legacy function's in-neighbours / neighbours split does.

Parameters ​

s ​

GraphSnapshot

The snapshot

o? ​

KatzOptions = {}

Algorithm options

Returns ​

KatzResult

The scores, the iteration count and the convergence flag