View source: R/extendr-wrappers.R
| rust_build_csr | R Documentation |
Build Compressed Sparse Row (CSR) graph representation. Drops self-loops, collapses parallel edges to minimum travel time, and returns CSR structures along with connected component analysis.
rust_build_csr(n_nodes, u, v, wt, wl)
n_nodes |
Number of nodes in the graph (0-indexed: 0..n-1). |
u |
From-node vector (0-indexed). |
v |
To-node vector (0-indexed). |
wt |
Travel time in seconds for each edge. |
wl |
Physical length in meters for each edge. |
A named list containing CSR arrays head, to, wt, and wl; node component IDs comp; and graph summaries n_edges_collapsed, giant_comp_id, giant_comp_size, and total_components. Node and component IDs are zero based.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.