pub fn infer_modules(
file_imports: &[(String, String)],
all_files: &[String],
depth: Option<usize>,
) -> Vec<Module>Expand description
Infer modules from file-level import edges.
Algorithm:
- Auto-detect directory depth (elbow method) or use provided depth
- Group files by directory at that depth
- For each group with LCOM4 > 1: recursively split into subdirectories
- For large groups with LCOM4 = 1 but ICR < 0.30: split one level