pub struct ClusteringResult {
pub clusters: Vec<ClusterComponent>,
pub regions: Vec<ComponentCandidate>,
pub symbol_component: HashMap<String, String>,
pub files_in_component: BTreeMap<String, Vec<String>>,
pub parent_per_comp: BTreeMap<String, String>,
pub component_weights: Vec<Vec<i32>>,
pub cross_unit: Vec<Vec<bool>>,
}Expand description
The structural output of the clusterer: what compile_components turns
into component entities. All maps are name/order aligned and sorted.
Fields§
§clusters: Vec<ClusterComponent>Clusters sorted by name (the order component entities are built in).
regions: Vec<ComponentCandidate>The pruned atomic regions (authoritative boundaries + code-region
dirs/subdirs), aligned with each cluster’s member_regions indices.
symbol_component: HashMap<String, String>symbol id -> component NAME (the cluster the symbol’s region merged into).
files_in_component: BTreeMap<String, Vec<String>>component name -> file entity ids.
parent_per_comp: BTreeMap<String, String>component name -> deployment unit name (tightest build context).
component_weights: Vec<Vec<i32>>Cross-component weight sums (aligned with clusters) for the
pass-2 service merge.
cross_unit: Vec<Vec<bool>>Cross-component deployment-unit constraint (aligned with
clusters): true when both sides sit in DIFFERENT deployment
units (such pairs merge only at weight > SERVICE_THRESHOLD).