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

Method keys

src/tree/binary/rb2.rs:187–197  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

185 }
186
187 fn keys(&self) -> Vec<&K> {
188 if self.is_empty() {
189 Vec::new()
190 } else {
191 let mut queue = Vec::with_capacity(self.size());
192 let lo = self.min().unwrap();
193 let hi = self.max().unwrap();
194 bst::keys(self.root, &mut queue, lo, hi);
195 queue
196 }
197 }
198}
199
200/// insert the element in the subtree rooted at h

Callers

nothing calls this directly

Calls 5

keysFunction · 0.70
is_emptyMethod · 0.45
sizeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected