Return the k-core of G.
A k-core is a maximal subgraph that contains nodes of degree k or more.
Parameters : | G : NetworkX graph
k : int, optional
core_number : dictionary, optional
|
---|---|
Returns : | G : NetworkX graph
|
Raises : | NetworkXError :
|
See also
Notes
The main core is the core with the largest degree.
Not implemented for graphs with parallel edges or self loops.
For directed graphs the node degree is defined to be the in-degree + out-degree.
Graph, node, and edge attributes are copied to the subgraph.
References
[R171] | An O(m) Algorithm for Cores Decomposition of Networks Vladimir Batagelj and Matjaz Zaversnik, 2003. http://arxiv.org/abs/cs.DS/0310049 |