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.
Properties
Section titled “Properties”edgeCount
Section titled “edgeCount”edgeCount:
number
Defined in: network/force.ts:12
optionalmass?: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.
moduleSprings?
Section titled “moduleSprings?”
optionalmoduleSprings?: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
Section titled “nodeCount”nodeCount:
number
Defined in: network/force.ts:11
positions
Section titled “positions”positions:
Float32Array
Defined in: network/force.ts:16
Interleaved [x, y, …], length 2 * nodeCount; mutated in place by the layout.
source
Section titled “source”source:
Uint32Array
Defined in: network/force.ts:13
springWeight?
Section titled “springWeight?”
optionalspringWeight?: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
Section titled “target”target:
Uint32Array
Defined in: network/force.ts:14