Skip to content

@graphty/algorithms / index / CorenessResult

Interface: CorenessResult ​

Defined in: indexed/k-core.ts:11

Result of the index-based k-core decomposition. coreness is the shape the accelerator seam declares (CorenessResultLike); maxCore and cores() are what the legacy kCoreDecomposition returns as maxCore and its cores map.

Properties ​

coreness ​

readonly coreness: U32

Defined in: indexed/k-core.ts:13

Core number per node index.


maxCore ​

readonly maxCore: number

Defined in: indexed/k-core.ts:15

The largest core number present; 0 on an empty graph.

Methods ​

cores() ​

cores(): U32[]

Defined in: indexed/k-core.ts:21

Node indices grouped by core number, computed once and cached: cores()[k] holds the nodes whose coreness is exactly k, so the array has maxCore + 1 entries.

Returns ​

U32[]

One array per core number