Package networkx :: Module cores
[hide private]
[frames] | no frames]

Module cores

source code

Find and manipulate the k-cores of a graph


Date: $Date: 2005-03-30 16:56:28 -0700 (Wed, 30 Mar 2005) $

Author: Dan Schult(dschult@colgate.edu)

Functions [hide private]
 
find_cores(G, with_labels=True)
Return the core number for each vertex.
source code
 
_test_suite() source code
Variables [hide private]
  __credits__ = ''
  __revision__ = '$Revision: 911 $'
Function Details [hide private]

find_cores(G, with_labels=True)

source code 

Return the core number for each vertex.

See: arXiv:cs.DS/0310049 by Batagelj and Zaversnik

If with_labels is True a dict is returned keyed by node to the core number. If with_labels is False a list of the core numbers is returned.