Skip to content

BuildStateGraphInput

Defined in: network/state-graph.ts:17

optional directed?: boolean

Defined in: network/state-graph.ts:38

Whether links render with arrowheads (applies to both views). Defaults to false.


optional nodeFlow?: ArrayLike<number>

Defined in: network/state-graph.ts:36

Optional per-state-node flow (length stateCount) — an Infomap visit rate the app supplies. Exposed as the state graph’s NetworkGraph.flow; the physical graph’s flow is the per-physical sum of its state nodes’ flow.


optional physicalCount?: number

Defined in: network/state-graph.ts:43

Number of physical nodes. Defaults to max(stateToPhysical) + 1. Pass it when some physical node has no state node in this slice (so the physical graph still allocates a slot for it).


source: ArrayLike<number>

Defined in: network/state-graph.ts:27

State-level directed edge endpoints (state-node indices), length edgeCount.


stateCount: number

Defined in: network/state-graph.ts:19

Number of state nodes.


stateToPhysical: ArrayLike<number>

Defined in: network/state-graph.ts:25

Per-state-node physical id, length stateCount. Physical ids must be dense in [0, physicalCount); a physical node is a distinct id. (The synthetic generator and Infomap’s state output both produce dense ids.)


target: ArrayLike<number>

Defined in: network/state-graph.ts:28


optional weight?: ArrayLike<number>

Defined in: network/state-graph.ts:30

Optional per-edge weight (flow); defaults to 1.