Skip to content

LayoutGraph

Defined in: network/force.ts:10

Minimal graph view the force core needs: node count, a directed edge list (used as undirected springs), and the positions buffer it mutates. NetworkGraph satisfies this structurally, and so does a synthetic coarse level (see ./coarsen.js) — so one force core lays out the full graph and every coarsening level without casts.

edgeCount: number

Defined in: network/force.ts:12


optional mass?: Float32Array<ArrayBufferLike>

Defined in: network/force.ts:23

Per-node mass, default 1 each. A node of mass m repels and is centred like m unit nodes standing in its place and accelerates as force ÷ m — a multilevel coarse level uses it so a supernode standing for m finest nodes claims their equilibrium area (see ./coarsen.js). Only a coarse level sets it; a NetworkGraph has none.


optional moduleSprings?: ModuleSprings

Defined in: network/force.ts:31

The module links as springs between their endpoints’ member centroids (#455, ModuleSprings) — the forces between modules an input like an Infomap .ftree carries only as module links. Each module’s members share its springs’ acceleration, so it moves as one body. For a graph of the springs’ leaves.


nodeCount: number

Defined in: network/force.ts:11


positions: Float32Array

Defined in: network/force.ts:16

Interleaved [x, y, …], length 2 * nodeCount; mutated in place by the layout.


source: Uint32Array

Defined in: network/force.ts:13


optional springWeight?: Float32Array<ArrayBufferLike>

Defined in: network/force.ts:25

Per-edge spring multiplier, parallel to source/target, default 1 each (a coarse level’s aggregated edges).


target: Uint32Array

Defined in: network/force.ts:14