@graphty/algorithms / index / toCSRGraph
Function: toCSRGraph() ​
toCSRGraph<
TNodeId>(graph):CSRGraph<TNodeId>
Defined in: optimized/graph-adapter.ts:207
Convert any graph to CSR format.
Type Parameters ​
TNodeId ​
TNodeId = NodeId
Parameters ​
graph ​
The graph to convert
Graph | ReadonlyGraph<TNodeId> | CSRGraph<TNodeId>
Returns ​
CSRGraph<TNodeId>
A CSRGraph instance (either the original if already CSR, or a new converted one)