Return the k-shell of G.
The k-shell is the subgraph of nodes in the k-core containing nodes of exactly degree k.
Parameters : | G : NetworkX graph
k : int, optional
core_number : dictionary, optional
|
---|---|
Returns : | G : NetworkX graph
|
Raises : | NetworkXError :
|
See also
core_number, k_corona, ----------
Notes
This is similar to k_corona but in that case only neighbors in the k-core are considered.
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.