MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / push

Method push

nodedb-array/src/tile/sparse_tile.rs:82–89  ·  view source on GitHub ↗
(&mut self, v: &CoordValue)

Source from the content-addressed store, hash-verified

80 }
81
82 fn push(&mut self, v: &CoordValue) {
83 if let Some(idx) = self.values.iter().position(|x| x == v) {
84 self.indices.push(idx as u32);
85 } else {
86 self.indices.push(self.values.len() as u32);
87 self.values.push(v.clone());
88 }
89 }
90
91 pub fn cardinality(&self) -> usize {
92 self.values.len()

Callers 15

append_framedMethod · 0.45
sparse_tileFunction · 0.45
make_sparseFunction · 0.45
buildMethod · 0.45
descendMethod · 0.45
encode_rleFunction · 0.45
decode_rleFunction · 0.45
decode_attr_colFunction · 0.45
encode_sparse_tileFunction · 0.45
decode_structuralFunction · 0.45
write_varintFunction · 0.45
try_encode_int64_dictFunction · 0.45

Calls 4

push_rowMethod · 0.80
iterMethod · 0.45
lenMethod · 0.45
cloneMethod · 0.45