Skip to main content

Module kcore

Module kcore 

Source
Expand description

k-core decomposition — each node’s core number: the largest k such that the node survives repeatedly peeling away every node of undirected degree < k. High core numbers mark the dense, well-connected heart of the graph.

Functions§

core_numbers
The core number of every node (undirected). core[i] = k means i belongs to the k-core but not the (k+1)-core. Batagelj–Zaveršnik O(m) peeling.
degeneracy
The max core value (the degeneracy of the graph) — the largest k for which a non-empty k-core exists. 0 for an edgeless graph.
k_core
The node indices in the k-core: every node whose core number is ≥ k.