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

Function slice_keeps_only_in_range_cells

nodedb-array/src/query/slice.rs:219–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218 #[test]
219 fn slice_keeps_only_in_range_cells() {
220 let s = schema();
221 let t = tile(&[(0, 0, 1), (5, 5, 2), (9, 9, 3)]);
222 let sl = Slice::new(vec![
223 Some(DimRange::new(DomainBound::Int64(4), DomainBound::Int64(10))),
224 None,
225 ]);
226 let out = slice_sparse(&s, &t, &sl).unwrap();
227 assert_eq!(out.nnz(), 2);
228 }
229
230 #[test]
231 fn empty_slice_keeps_everything() {

Callers

nothing calls this directly

Calls 3

slice_sparseFunction · 0.85
schemaFunction · 0.70
tileFunction · 0.70

Tested by

no test coverage detected