
GPU-accelerated Leiden and Louvain clustering
rs_leiden_clustering_gpu.Rd
GPU twin of
bixverse::rs_leiden_clustering. Level-0 local moving runs on
the wgpu backend; coarser levels, refinement and aggregation stay on the
CPU. Graphs below 50,000 nodes, or with a node of degree above 512, run
fully on the CPU with coloured local moving. On one device the result
depends on the seed only.
Arguments
- edges
Integer vector. Flattened edge pairs (1-indexed!),
c(from_1, to_1, from_2, to_2, ...), asbixverse::rs_graph_to_edges()returns them.- weights
Numeric vector. One weight per pair.
- n_nodes
Integer. Number of nodes in the graph.
- leiden_params
List. Named list with the optional fields
resolution,beta,n_iterations(negative: until stable),min_gain,refine(TRUEfor Leiden,FALSEfor Louvain),local_movingandnode_order(coarser levels only) andseed.