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

Method to_string

src/common/uf.rs:225–235  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

223
224impl ToString for UF {
225 fn to_string(&self) -> String {
226 let mut buf = Vec::new();
227 buf.push(format!("{} sets", self.count));
228 for i in 0..self.parent.len() {
229 buf.push(format!(
230 "{}: parent = {}, rank = {}",
231 i, self.parent[i], self.rank[i]
232 ));
233 }
234 buf.join("\n")
235 }
236}
237
238macro_rules! uf_util {

Callers 5

keys_with_prefixMethod · 0.45
keys_with_prefixMethod · 0.45
collect_prefixFunction · 0.45
index_min_pqFunction · 0.45
index_max_pqFunction · 0.45

Calls 2

pushMethod · 0.80
lenMethod · 0.45

Tested by 2

index_min_pqFunction · 0.36
index_max_pqFunction · 0.36