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

Method new

src/common/uf.rs:88–91  ·  view source on GitHub ↗
(n: usize)

Source from the content-addressed store, hash-verified

86
87impl QuickFindUF {
88 pub fn new(n: usize) -> Self {
89 let id = (0..n).collect();
90 Self { id, count: n }
91 }
92
93 /// Returns the canonical element of the set containing element p
94 pub fn find(&self, p: usize) -> usize {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected