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.
Parameters
Section titled “Parameters”nodeCount
Section titled “nodeCount”number
source
Section titled “source”ArrayLike<number>
target
Section titled “target”ArrayLike<number>
weight?
Section titled “weight?”ArrayLike<number>