Skip to main content

detect_clusters

Function detect_clusters 

Source
pub fn detect_clusters(conn: &Connection<'_>) -> Result<ClusterStats>
Expand description

Run Louvain community detection on the code graph and store results.

  1. Queries all CALLS edges to build an undirected adjacency list.
  2. Runs single-level Louvain (iterative modularity optimization).
  3. Creates Cluster nodes and MEMBER_OF edges in the graph.