This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
- graph_core_number(graph, /)#
Return the core number for each node in the graph.
A k-core is a maximal subgraph that contains nodes of degree k or more.
The function implicitly assumes that there are no parallel edges or self loops. It may produce incorrect/unexpected results if the input graph has self loops or parallel edges.
PyGraph – The graph to get core numbers
A dictionary keyed by node index to the core number
- Return type: