Get current component assignment: (vertex_name, global_label).
(&self)
| 174 | |
| 175 | /// Get current component assignment: (vertex_name, global_label). |
| 176 | pub fn component_labels(&self) -> Vec<(String, String)> { |
| 177 | (0..self.vertex_count) |
| 178 | .map(|i| { |
| 179 | let root = find_static(&self.parent, i); |
| 180 | (self.node_names[i].clone(), self.global_labels[root].clone()) |
| 181 | }) |
| 182 | .collect() |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | /// Non-mutating find (no path compression). Borrow-safe. |