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

Function tile

nodedb-array/src/query/slice.rs:205–216  ·  view source on GitHub ↗
(rows: &[(i64, i64, i64)])

Source from the content-addressed store, hash-verified

203 }
204
205 fn tile(rows: &[(i64, i64, i64)]) -> SparseTile {
206 let s = schema();
207 let mut b = SparseTileBuilder::new(&s);
208 for (x, y, v) in rows {
209 b.push(
210 &[CoordValue::Int64(*x), CoordValue::Int64(*y)],
211 &[CellValue::Int64(*v)],
212 )
213 .unwrap();
214 }
215 b.build()
216 }
217
218 #[test]
219 fn slice_keeps_only_in_range_cells() {

Callers 2

Calls 3

schemaFunction · 0.70
pushMethod · 0.45
buildMethod · 0.45

Tested by 2