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§
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/exportsedges are weak ties. Accepts both the PropertyGraph kind spelling (imports,calls) and the graph-index spelling (import,call) so either backend yields identical weights.