Skip to content

BuildStateGraphInput

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

optional directed?: boolean

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

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


optional nodeFlow?: ArrayLike<number>

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

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:47

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:31

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


stateCount: number

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

Number of state nodes.


stateToPhysical: ArrayLike<number>

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

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:32


optional weight?: ArrayLike<number>

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

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