LODTree
Defined in: network/lod.ts:213
A retained coarsening tree, flattened to SoA typed arrays for cache-friendly traversal at scale.
Tree nodes are numbered by level: level 0 (the original graph) occupies global ids [0, leafCount)
and is the leaves; each coarser level follows, and the coarsest level is the roots. Ids are
stable for the life of the graph, so aggregates keep their identity across frames (no popping).
Extends
Section titled “Extends”LODTopology
Properties
Section titled “Properties”border
Section titled “border”border:
Float32Array
Defined in: network/lod.ts:242
Summed leaf flow-border metric (e.g. enter/exit flow) — the raw value a flow border encodes (#104 N6). Each leaf takes its provided value; each aggregate the sum of its descendants’, so a module’s border reflects its members’ total. Zero when no border metric is supplied. The draw scale (value → ring width) is applied at glyph-build time, not stored here.
borderFlow?
Section titled “borderFlow?”
optionalborderFlow?:Float32Array<ArrayBufferLike>
Defined in: network/lod.ts:249
Summed leaf flow under a share-mode flow border (#510): each leaf its node flow, each aggregate the sum
of its descendants’, so a glyph’s border covers the share border / borderFlow of its area. Present only
when computeLODStyle was given the leaf flow (the share mode); absent otherwise, so the absolute
mode holds no extra array.
branch?
Section titled “branch?”
optionalbranch?:Int32Array<ArrayBufferLike>
Defined in: network/lod.ts:82
Provided-module trees only (#197/#324): each tree node’s last Infomap path entry — a module’s branch
id within its parent, a leaf’s rank in its module; -1 for the root. With parent it spells
any node’s path (walk up, collecting entries) — so an aggregate can be named by its module.
Inherited from
Section titled “Inherited from”LODTopology.branch
childOffset
Section titled “childOffset”childOffset:
Uint32Array
Defined in: network/lod.ts:40
Children CSR: node g’s children are children[childOffset[g] .. childOffset[g+1]] (one level finer).
Inherited from
Section titled “Inherited from”LODTopology.childOffset
children
Section titled “children”children:
Uint32Array
Defined in: network/lod.ts:41
Inherited from
Section titled “Inherited from”LODTopology.children
clearZoom
Section titled “clearZoom”clearZoom:
Float32Array
Defined in: network/lod.ts:268
Clear zoom (#426), per node: the zoom from which no two of the node’s members’ glyphs overlap on
screen — each drawn at its own radius (sizeMode units: constant px, or world units × k) and never
smaller than half a pixel. The cut opens an aggregate once the view is zoomed past it, whatever its
footprint, so an aggregate is drawn only where its members would overlap. Exact up to the zoom at which
the aggregate’s footprint — or an ancestor’s, whichever comes later — reaches the expand threshold: past
that the footprint rule opens it anyway, so the pass stores Infinity there (see
computeLODCrowding). Infinity too for members that
never part (coincident, or world discs that overlap) and until a crowding pass has run: then only the
footprint rule opens the node. Leaves hold 0.
color:
Uint8Array
Defined in: network/lod.ts:256
Per-node fill colour as RGBA bytes, length 4 · size (#104 N6 rework). Each leaf takes its
provided colour; each aggregate the (count-)averaged colour of its descendants — so a module
drawn from a categorical palette keeps its colour when collapsed, and its leaves share it. Zero
when no colours are supplied (the engine falls back to a single fill).
count:
Uint32Array
Defined in: network/lod.ts:233
Number of leaf descendants.
cx:
Float32Array
Defined in: network/lod.ts:216
Centroid x of each node’s leaf descendants.
cy:
Float32Array
Defined in: network/lod.ts:218
Centroid y of each node’s leaf descendants.
depth?
Section titled “depth?”
optionaldepth?:Int32Array<ArrayBufferLike>
Defined in: network/lod.ts:76
Per-node depth below the root (root = 0), length size — built and present together with the
super-edge CSR. A pair whose endpoints differ in depth is a lift pair (#325); the gather follows it
only from its deeper endpoint, so its flow is never counted twice.
buildSuperEdges
Inherited from
Section titled “Inherited from”LODTopology.depth
edgeNeighbors
Section titled “edgeNeighbors”edgeNeighbors:
Uint32Array
Defined in: network/lod.ts:56
Inherited from
Section titled “Inherited from”LODTopology.edgeNeighbors
edgeOffset
Section titled “edgeOffset”edgeOffset:
Uint32Array
Defined in: network/lod.ts:55
Same-level adjacency CSR for aggregates (super-edges): aggregate g’s same-level neighbours
are edgeNeighbors[edgeOffset[g] .. edgeOffset[g+1]]. Built from the coarse levels only; leaf
adjacency is the graph’s own CSR (a leaf’s global id equals its node id), so leaf entries are
empty here. Symmetric.
Inherited from
Section titled “Inherited from”LODTopology.edgeOffset
extent
Section titled “extent”extent:
Float32Array
Defined in: network/lod.ts:223
Spatial bounding radius (world units): an upper bound on the distance from the centroid to any descendant leaf. Drives viewport culling and the zoom-driven expand trigger.
leafBranching
Section titled “leafBranching”leafBranching:
number
Defined in: network/lod.ts:277
Leaf-level branching (#191): how many children the aggregate that owns a typical leaf has —
the median child count of the leaf-parents, weighted by how many leaves each owns. 2 for a
binary coarsening tree, 1 for a quadtree bottom cell, 30–600 for a provided module
partition. Pure topology, so it is computed once per tree at build (leafBranchingOf)
and never changes as the layout converges. Drives the adaptive default expand threshold —
see defaultExpandPx.
leafCount
Section titled “leafCount”leafCount:
number
Defined in: network/lod.ts:34
Number of leaves (= graph.nodeCount = level-0 node count).
Inherited from
Section titled “Inherited from”LODTopology.leafCount
leafEnd?
Section titled “leafEnd?”
optionalleafEnd?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:120
Per-node rank one past its last leaf in leafOrder, length size.
Inherited from
Section titled “Inherited from”LODTopology.leafEnd
leafOrder?
Section titled “leafOrder?”
optionalleafOrder?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:116
Contiguous leaf ranges (#343): the leaves in an order where every tree node’s leaf descendants
are one run — node g covers leafOrder[leafStart[g] .. leafEnd[g]). A leaf’s own run is its rank
(leafEnd = leafStart + 1), so two nodes are nested iff their runs overlap. Present on a spatial
(Morton) tree (buildMortonLODTree), where it lets the super-edge gather walk a glyph’s leaves
without a super-edge CSR; absent on coarsening and module trees.
Inherited from
Section titled “Inherited from”LODTopology.leafOrder
leafStart?
Section titled “leafStart?”
optionalleafStart?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:118
Per-node first rank into leafOrder, length size (a leaf’s is its own rank).
Inherited from
Section titled “Inherited from”LODTopology.leafStart
levelCount
Section titled “levelCount”levelCount:
number
Defined in: network/lod.ts:36
Number of coarsening levels; 1 means no coarsening was possible (tiny / edge-less graph).
Inherited from
Section titled “Inherited from”LODTopology.levelCount
levelOffset
Section titled “levelOffset”levelOffset:
Uint32Array
Defined in: network/lod.ts:38
Global-id start of each level; length levelCount + 1. Level k is [levelOffset[k], levelOffset[k+1]).
Inherited from
Section titled “Inherited from”LODTopology.levelOffset
moduleLinkFlow?
Section titled “moduleLinkFlow?”
optionalmoduleLinkFlow?:Float32Array<ArrayBufferLike>
Defined in: network/lod.ts:105
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkFlow
moduleLinkInFlow?
Section titled “moduleLinkInFlow?”
optionalmoduleLinkInFlow?:Float32Array<ArrayBufferLike>
Defined in: network/lod.ts:108
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkInFlow
moduleLinkInOffset?
Section titled “moduleLinkInOffset?”
optionalmoduleLinkInOffset?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:106
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkInOffset
moduleLinkInSource?
Section titled “moduleLinkInSource?”
optionalmoduleLinkInSource?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:107
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkInSource
moduleLinkOffset?
Section titled “moduleLinkOffset?”
optionalmoduleLinkOffset?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:103
The module links (#199) indexed by their own endpoints (#329), for anchoring a link at an
expanded module’s boundary: aggregate g’s outgoing links are
[moduleLinkOffset[g − leafCount] .. moduleLinkOffset[g − leafCount + 1]) → moduleLinkTarget
with moduleLinkFlow, its incoming ones the same in the moduleLinkIn* arrays. Summed per
ordered pair; a link inside one subtree (into an endpoint’s own ancestor) is left out, as in the
super-edge CSR. Rows exist for aggregates only (a leaf is never expanded), so each offsets array
has size − leafCount + 1 entries. Present only on a module tree built with module links — graph
edges never enter it.
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkOffset
moduleLinkTarget?
Section titled “moduleLinkTarget?”
optionalmoduleLinkTarget?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:104
Inherited from
Section titled “Inherited from”LODTopology.moduleLinkTarget
morton?
Section titled “morton?”
optionalmorton?:MortonCells
Defined in: network/lod.ts:122
A spatial (Morton) tree’s cells (#343): each aggregate’s square in the root box.
MortonCells
Inherited from
Section titled “Inherited from”LODTopology.morton
parent?
Section titled “parent?”
optionalparent?:Int32Array<ArrayBufferLike>
Defined in: network/lod.ts:48
Per-node parent global id (one level coarser), length size; the root’s parent is -1. Lets the
super-edge gather walk a node up to its nearest present ancestor for cross-level edges (#139).
Present on provided-module trees (built with the parent map); absent on coarsening/spatial trees,
which also carry no super-edge CSR — so the cross-level path never needs it there.
Inherited from
Section titled “Inherited from”LODTopology.parent
radius
Section titled “radius”radius:
Float32Array
Defined in: network/lod.ts:231
Visual draw radius (world units): leaves take their resolved per-node radius (degree/strength/…
encoded); each aggregate is √(Σ child radius²) — area-additive, so it’s agnostic to the node
sizing and an aggregate’s ink ≈ its contents’ total ink — unless a RadiusAggregate is
supplied, when an aggregate is sized by the leaf scale on its summed metric (flow-sized modules).
Drives drawing and declutter occupancy.
optionalrows?:SpatialRows
Defined in: network/lod.ts:129
A streamed spatial tree’s super-edge rows (#433), built off the main thread with the tree: per cell
the worker’s view kept, the flow of its edges toward each cover of that cut, so the super-edge gather
(lazySuperEdges) reads the kept glyphs’ rows instead of walking the edges under the frontier. Absent
on a tree the main thread built.
SpatialRows
Inherited from
Section titled “Inherited from”LODTopology.rows
size:
number
Defined in: network/lod.ts:32
Total tree nodes across all levels.
Inherited from
Section titled “Inherited from”LODTopology.size
superEdgeFlow?
Section titled “superEdgeFlow?”
optionalsuperEdgeFlow?:Float32Array<ArrayBufferLike>
Defined in: network/lod.ts:70
Inherited from
Section titled “Inherited from”LODTopology.superEdgeFlow
superEdgeInFlow?
Section titled “superEdgeInFlow?”
optionalsuperEdgeInFlow?:Float32Array<ArrayBufferLike>
Defined in: network/lod.ts:92
Inherited from
Section titled “Inherited from”LODTopology.superEdgeInFlow
superEdgeInOffset?
Section titled “superEdgeInOffset?”
optionalsuperEdgeInOffset?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:90
The transpose of the super-edge CSR (in-adjacency, by target): node g’s incoming edges are
[superEdgeInOffset[g] .. superEdgeInOffset[g+1]), coming from superEdgeInSource with the same
summed superEdgeInFlow. Lets the gather keep a visible node’s edges to off-screen neighbours in
both directions (incoming as well as outgoing) without scanning off-screen sources. Built and
present together with the out-adjacency above.
buildSuperEdges
Inherited from
Section titled “Inherited from”LODTopology.superEdgeInOffset
superEdgeInSource?
Section titled “superEdgeInSource?”
optionalsuperEdgeInSource?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:91
Inherited from
Section titled “Inherited from”LODTopology.superEdgeInSource
superEdgeOffset?
Section titled “superEdgeOffset?”
optionalsuperEdgeOffset?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:68
Directed, flow-weighted super-edges (#104 N6c), built from a provided module hierarchy so a
map’s inter-module links render as bent half-arrows. Out-adjacency CSR over all tree nodes:
node g’s out-edges are [superEdgeOffset[g] .. superEdgeOffset[g+1]), going to superEdgeTarget
with summed directed superEdgeFlow. A graph edge contributes at every level from the leaves up to
its endpoints’ lowest common module, so leaf↔leaf and module↔module pairs both have an entry —
whichever the cut makes visible. Between endpoints at different depths (a ragged tree) it also
contributes a lift pair per level in between, pairing each deeper-side node with the shallower
endpoint in the edge’s direction (#325), so a depth-4 leaf and a depth-3 leaf are linked directly.
Absent for coarsening / spatial trees.
Inherited from
Section titled “Inherited from”LODTopology.superEdgeOffset
superEdgeTarget?
Section titled “superEdgeTarget?”
optionalsuperEdgeTarget?:Uint32Array<ArrayBufferLike>
Defined in: network/lod.ts:69
Inherited from
Section titled “Inherited from”LODTopology.superEdgeTarget
weight
Section titled “weight”weight:
Float32Array
Defined in: network/lod.ts:235
Summed leaf importance (default: strength) — drives super-edge weight and declutter priority.