@graphty/algorithms / index / kCoreDecomposition
Function: kCoreDecomposition() ​
kCoreDecomposition(
s):CorenessResult
Defined in: indexed/k-core.ts:38
Core number of every node, by the Batagelj-Zaversnik bucket peel: O(nodes + arcs), no priority queue and no per-node object.
Core numbers are defined on a SIMPLE graph, so a parallel arc counts once (parallels are adjacent within a row, invariant I4) and a self-loop does not count at all, as NetworkX defines it. The legacy implementation's adjacency-of-sets counts a self-loop as one neighbour, so there a node with a self-loop can sit higher, and so can a node without one whose core leaned on self-looped neighbours. The result equals the legacy function's on the graph with every self-loop removed.
Parameters ​
s ​
GraphSnapshot
An undirected snapshot
Returns ​
The core numbers, the largest of them, and the lazy grouping