aryagraph.algorithms.structure.core_number#
- aryagraph.algorithms.structure.core_number(g: Any) NodeMap[source]#
k-core number of every node (Batagelj–Zaversnik bucket algorithm,
O(n + m)).Directed graphs use in-degree + out-degree (a reciprocated pair counts twice), as networkx. Self-loops are ignored (they cannot hold a node in a core), whereas networkx refuses graphs that have them.