Skip to main content

Module graph

Module graph 

Source
Expand description

Undirected, weighted adjacency representation of the file-level code graph.

Parallel edges are merged (weights summed) and the adjacency is symmetric so modularity and connectivity computations are correct. The same structure is built from the PropertyGraph (SQLite) and from any GraphProvider, which keeps community detection storage-agnostic.

Structs§

AdjGraph

Functions§

cohesion_of
Fraction of a community’s incident edges that stay inside it (0.0..=1.0).
edge_counts
Internal vs. external edge endpoints for a community (symmetric adjacency, so each internal undirected edge contributes twice — the cohesion ratio is unaffected).
edge_weight
Edge weight by semantic kind. Calls bind tighter than plain imports; purely structural defines/exports edges are weak ties. Accepts both the PropertyGraph kind spelling (imports, calls) and the graph-index spelling (import, call) so either backend yields identical weights.