Skip to content

buildCSR

buildCSR(nodeCount, source, target, weight?): CSR

Defined in: network/graph.ts:31

Build undirected (symmetric) CSR adjacency from a directed edge list. Each edge contributes to both endpoints, so layout/traversal see the graph as undirected while the directed edges remain available for arrow rendering. With weight (parallel to source/target), each entry also carries its edge’s weight in weights, scattered in the same order as neighbors.

number

ArrayLike<number>

ArrayLike<number>

ArrayLike<number>

CSR