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

Function cell_in_slice

nodedb-array/src/query/slice.rs:145–157  ·  view source on GitHub ↗
(coord: &[CoordValue], slice: &Slice)

Source from the content-addressed store, hash-verified

143}
144
145fn cell_in_slice(coord: &[CoordValue], slice: &Slice) -> bool {
146 for (i, range) in slice.dim_ranges.iter().enumerate() {
147 let Some(r) = range else { continue };
148 let Some(c) = coord.get(i) else {
149 return false;
150 };
151 let cb = coord_to_bound(c);
152 if bound_lt(&cb, &r.lo) || bound_lt(&r.hi, &cb) {
153 return false;
154 }
155 }
156 true
157}
158
159fn bound_lt(a: &DomainBound, b: &DomainBound) -> bool {
160 match (a, b) {

Callers 1

slice_sparseFunction · 0.85

Calls 4

bound_ltFunction · 0.85
coord_to_boundFunction · 0.70
iterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected