Skip to content

@graphty/algorithms / index / indexed / eigenvectorCentrality

Function: eigenvectorCentrality() ​

eigenvectorCentrality(s, o?): EigenvectorResult

Defined in: indexed/eigenvector.ts:50

Eigenvector centrality by power iteration on (A + I), as networkx does: the identity shift leaves the eigenvectors alone and makes the largest eigenvalue the only one of largest magnitude, so a bipartite or periodic graph converges instead of oscillating. Each node's neighbours are counted once however many parallel edges join them, as in the legacy neighbour sets. When the relation has no cycle (no arcs, or a directed acyclic graph) its matrix is nilpotent and every score is exactly 0.

Parameters ​

s ​

GraphSnapshot

The snapshot

o? ​

EigenvectorOptions = {}

Algorithm options

Returns ​

EigenvectorResult

The scores, the iteration count and the convergence flag

Throws ​

When maxIterations passes do not meet the tolerance