MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / component_labels

Method component_labels

nodedb-cluster/src/distributed_graph/wcc.rs:176–183  ·  view source on GitHub ↗

Get current component assignment: (vertex_name, global_label).

(&self)

Source from the content-addressed store, hash-verified

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.

Callers 3

wcc_shard_local_onlyFunction · 0.80

Calls 3

find_staticFunction · 0.85
collectMethod · 0.80
cloneMethod · 0.45

Tested by 3

wcc_shard_local_onlyFunction · 0.64