Skip to content

lumpStateGraph

lumpStateGraph(sg, modules?, moduleLinks?): LumpedStateNetwork

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

Lump sg’s state nodes by (leaf module, physical node) (#529), with modules a record per state node (Infomap’s nodes shape; the leaf module is the record’s path less its last entry). Without modules every state node is in the root module, so each physical node’s state nodes are one lump: the lumped network is the physical one. A lump’s links are the summed links of its state nodes to other lumps, its flow the sum of theirs: the same merge as the physical graph’s. O(state nodes + state links + lumps · log lumps).

With moduleLinks (#533, addressed by path in modules’ hierarchy) the result carries them in the lumps’ hierarchy (LumpedStateNetwork.moduleLinks); they require modules, and an endpoint outside it throws. O(state nodes · depth + links · depth) more.

StateNetworkGraph

ArrayLike<ModulePathNode> | null

ArrayLike<ModuleLink> | null

LumpedStateNetwork