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

Method clone

src/math/sparse_vector.rs:126–132  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

124
125impl Clone for SparseVector {
126 fn clone(&self) -> Self {
127 let mut c = Self::new(self.d);
128 for &i in self.st.keys() {
129 c.put(i, self.get(i));
130 }
131 c
132 }
133}
134
135#[derive(Debug)]

Callers 15

large_merge_v1Function · 0.80
eq_data_merge_v1Function · 0.80
large_merge_v2Function · 0.80
eq_data_merge_v2Function · 0.80
large_merge_v3Function · 0.80
eq_data_merge_v3Function · 0.80

Calls 3

keysMethod · 0.45
putMethod · 0.45
getMethod · 0.45

Tested by 3

gen_vec_dataFunction · 0.64
heapifyFunction · 0.64
build_heapFunction · 0.64