Skip to content

@graphty/algorithms / index / kCoreDecomposition

Function: kCoreDecomposition() ​

kCoreDecomposition(graph): KCoreResult<string>

Defined in: clustering/k-core.ts:488

K-Core decomposition algorithm Finds all k-cores in the graph and assigns coreness values to nodes

Parameters ​

graph ​

Graph

Undirected graph - accepts Graph class or Map<T, Set<T>>

Returns ​

KCoreResult<string>

K-core decomposition results

Time Complexity: O(V + E) Space Complexity: O(V)