core_decomposition

Computes a core decomposition of the graph.

sasviya.network.algorithms.cores.core_decomposition(g, maxtime=None, *, data=True)

Parameters

g : SAS graph object

Specifies the input graph for which to calculate the core decomposition.

maxtime : float or None, optional

Specifies the maximum amount of time for core decomposition to spend. The default is None.

data : bool, optional

Specifies whether or not to retain attributes. The default is True, which means that the node and edge attributes of the graph are retained.

Yields

generator

Yields a generator of subgraphs; each subgraph represents one k-core in increasing core number. The generator has the solution_summary attribute, which contains information about the results of the algorithm.

Last updated: July 28, 2026