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

Function find_static

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

Non-mutating find (no path compression). Borrow-safe.

(parent: &[usize], mut x: usize)

Source from the content-addressed store, hash-verified

185
186/// Non-mutating find (no path compression). Borrow-safe.
187fn find_static(parent: &[usize], mut x: usize) -> usize {
188 while parent[x] != x {
189 x = parent[x];
190 }
191 x
192}
193
194#[cfg(test)]
195mod tests {

Callers 3

roundMethod · 0.85
apply_mergesMethod · 0.85
component_labelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected