Skip to content

buildModuleLODTree

buildModuleLODTree(nodeCount, records, edges?, links?): LODTree

Defined in: network/modules.ts:169

Build a LODTree from a provided module hierarchy (the priority-chain entry that precedes structural coarsening). Geometry is left zeroed — fill it with computeLODGeometry once positions exist.

With edges (the graph’s directed edge list), also derive directed, flow-weighted super-edges (#104 N6c) so a map’s inter-module links render as bent half-arrows; omit them (N6a) for a node-only map. records must cover every node 0..nodeCount-1 exactly once.

With links (ModuleLinks, #199), module-level links addressed by path add their flow to the super-edges directly — for inputs like an Infomap .ftree that carry inter-module links only in aggregate, with no leaf edges to derive them from.

number

ArrayLike<ModuleNode>

ModuleEdges

ArrayLike<ModuleLink>

LODTree