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

Function insert_many_and_search

nodedb-spatial/src/rtree/tree.rs:193–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191
192 #[test]
193 fn insert_many_and_search() {
194 let mut tree = RTree::new();
195 for i in 0..200 {
196 tree.insert(make_entry(
197 i,
198 (i as f64) * 0.5 - 50.0,
199 (i as f64) * 0.3 - 30.0,
200 ));
201 }
202 assert_eq!(tree.len(), 200);
203 let all = tree.search(&BoundingBox::new(-180.0, -90.0, 180.0, 90.0));
204 assert_eq!(all.len(), 200);
205 }
206
207 #[test]
208 fn delete_entry() {

Callers

nothing calls this directly

Calls 3

make_entryFunction · 0.70
insertMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected