coarsenLevel
coarsenLevel(
level):object
Defined in: network/coarsen.ts:130
One coarsening step. Visit nodes in index order and pair each unmatched node with its heaviest unmatched neighbour (lowest index breaks ties → deterministic). A node with no unmatched neighbour is adopted into its heaviest already-matched neighbour’s group rather than left as a singleton: without this, hub/star structures (pervasive in power-law graphs) barely shrink — each pass strips only a couple of nodes, the hierarchy hits its level cap, and the multilevel seed runs dozens of force solves on near-full graphs (#117). Adoption keeps the per-level reduction roughly geometric. Then aggregate the surviving inter-group edges (parallel edges summed, internal edges dropped).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
coarse
Section titled “coarse”coarse:
CoarseLevel
projection
Section titled “projection”projection:
Uint32Array