CSR
Defined in: network/graph.ts:10
Compressed-sparse-row adjacency.
Properties
Section titled “Properties”degree
Section titled “degree”degree:
Uint32Array
Defined in: network/graph.ts:20
Per-node row length in neighbors (offsets[i+1] − offsets[i]); length nodeCount. Structural: a
self-link puts two entries in its node’s row, so it counts twice here. For the degree METRIC (a
self-link counted once, as Infomap counts it) read NetworkGraph.degree.
neighbors
Section titled “neighbors”neighbors:
Uint32Array
Defined in: network/graph.ts:14
Flattened neighbor ids; node i’s neighbors are neighbors[offsets[i]..offsets[i+1]].
offsets
Section titled “offsets”offsets:
Uint32Array
Defined in: network/graph.ts:12
Per-node start offset into neighbors; length nodeCount + 1.
weights?
Section titled “weights?”
optionalweights?:Float32Array<ArrayBufferLike>
Defined in: network/graph.ts:25
Per-entry weight parallel to neighbors (the weight of the edge each entry came from), present
only when buildCSR was given edge weights — the GPU layout’s weighted springs read it.