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

Function make_tile

nodedb-array/src/codec/tile_decode.rs:215–229  ·  view source on GitHub ↗
(s: &crate::schema::ArraySchema, n: usize)

Source from the content-addressed store, hash-verified

213 }
214
215 fn make_tile(s: &crate::schema::ArraySchema, n: usize) -> SparseTile {
216 let mut b = SparseTileBuilder::new(s);
217 for i in 0..n {
218 b.push_row(SparseRow {
219 coord: &[CoordValue::Int64(i as i64)],
220 attrs: &[CellValue::Int64(i as i64 * 2)],
221 surrogate: Surrogate::ZERO,
222 valid_from_ms: i as i64,
223 valid_until_ms: OPEN_UPPER,
224 kind: RowKind::Live,
225 })
226 .unwrap();
227 }
228 b.build()
229 }
230
231 fn roundtrip(tile: &SparseTile) -> SparseTile {
232 let mut buf = Vec::new();

Callers 4

small_tile_roundtripFunction · 0.70

Calls 2

push_rowMethod · 0.80
buildMethod · 0.45

Tested by 4

small_tile_roundtripFunction · 0.56