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

Function bulk_load_500

nodedb-spatial/src/rtree/bulk_load.rs:162–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161 #[test]
162 fn bulk_load_500() {
163 let entries: Vec<RTreeEntry> = (0..500)
164 .map(|i| make_entry(i, (i as f64) * 0.1 - 25.0, (i as f64) * 0.06 - 15.0))
165 .collect();
166 let tree = RTree::bulk_load(entries);
167 assert_eq!(tree.len(), 500);
168
169 let all = tree.search(&BoundingBox::new(-180.0, -90.0, 180.0, 90.0));
170 assert_eq!(all.len(), 500);
171
172 let subset = tree.search(&BoundingBox::new(-5.0, -5.0, 5.0, 5.0));
173 assert!(!subset.is_empty());
174 }
175
176 #[test]
177 fn bulk_load_small() {

Callers

nothing calls this directly

Calls 4

bulk_loadFunction · 0.85
collectMethod · 0.80
make_entryFunction · 0.70
searchMethod · 0.45

Tested by

no test coverage detected