NetworkDataOptions
Defined in: network/network.ts:731
A module hierarchy for Network.data (#326) — data the engine owns alongside the graph,
like stateNetwork(graph, { modules }) does for a state network. Every module consumer reads it
whatever the LOD state: the LOD cut (its default NetworkLODOptions.source), the nested layout
(layout({ nested })), the module-aware GPU seed, and NetworkHit.path. lod(false) keeps it;
a new data(graph) without it clears it.
Properties
Section titled “Properties”moduleLinks?
Section titled “moduleLinks?”
optionalmoduleLinks?:ArrayLike<ModuleLink>
Defined in: network/network.ts:756
Module-level links addressed by path (#199), summed into the map’s super-edges alongside those
derived from the graph’s edges. Use it when the input carries inter-module links only in aggregate —
an Infomap .ftree stores leaf links only inside bottom modules, and each coarser link once per
level in its *Links sections — so the map draws exactly those links, with no leaf edges invented
to stand in for them. Requires modules; data() checks up front that every endpoint is a module or
leaf of that hierarchy and throws otherwise.
The flat force layouts (backend: "force", "worker", "gpu", "auto") pull along them too (#455):
each is a spring between the centroids of its two endpoints’ members (a leaf endpoint is itself), with
the leaf springs’ strength times its flow over the graph’s mean edge weight, and each member of a
module shares its pull, so the module moves as one body — in the run and in a drag reheat. A link into
its own endpoint’s ancestor is no spring, and a link between two leaves is none either (pass it as a
graph edge). Module links are summed with the graph’s edges, so don’t repeat links the graph has.
modules?
Section titled “modules?”
optionalmodules?:ArrayLike<ModuleNode>
Defined in: network/network.ts:740
The module assignment (N6 / #104): Infomap’s JSON nodes array directly — each record’s id is
the dense node index (aligned with buildGraph) and path its 1-based module chain ([2, 1, 3] =
top module 2 → sub-module 1 → the node ranked 3). Records must cover every node exactly once;
data() checks this up front and throws on a misaligned hierarchy. The module tree (and its
super-edges) is built lazily, once per graph + hierarchy, the first time a consumer needs it.