MCPcopy Create free account
hub / github.com/douchuan/algorithm / find

Method find

src/common/uf.rs:94–96  ·  view source on GitHub ↗

Returns the canonical element of the set containing element p

(&self, p: usize)

Source from the content-addressed store, hash-verified

92
93 /// Returns the canonical element of the set containing element p
94 pub fn find(&self, p: usize) -> usize {
95 self.id[p]
96 }
97
98 /// Merges the set containing element p with the
99 /// the set containing element q

Callers 5

unionMethod · 0.80
newMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected