You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
println!("Found {} points within radius 2.5", results.len());
74
-
// Results are sorted by distance (closest first)
75
74
76
75
// Find K nearest points
77
76
letmutresults=Vec::new();
@@ -122,10 +121,10 @@ The curve preserves spatial locality - points close to each other in 2D space te
122
121
-`query_circle(center_x, center_y, radius, results)``(f64)` - Find boxes intersecting a circular region
123
122
124
123
#### Point-Specific Optimized Queries
125
-
-`query_nearest_k_points(x, y, k, results)``(f64)` - **Optimized** - Find K nearest points (stored as (x, x, y, y)) - ~30% faster than `query_nearest_k` for point clouds
126
-
-`query_circle_points(center_x, center_y, radius, results)``(f64)` - **Optimized** - Find points within a circular region with distance-sorted results - ~30% faster than `query_circle`for point clouds
124
+
-`query_nearest_k_points(x, y, k, results)``(f64)` - Find K nearest points (stored as (x, x, y, y)), sorted by distance
125
+
-`query_circle_points(center_x, center_y, radius, results)``(f64)` - Find points within a circular region (optimized for point data)
127
126
128
-
**Note:** Point-specific methods assume all items in the tree are stored as degenerate boxes (points) where `min_x == max_x` and `min_y == max_y`. For mixed data (both points and boxes), use the general methods instead. Results from point-specific queries are automatically sorted by distance (closest first).
127
+
**Note:** Point-specific methods assume all items in the tree are stored as degenerate boxes (points) where `min_x == max_x` and `min_y == max_y`. For mixed data (both points and boxes), use the general methods instead.
129
128
130
129
#### Directional Queries
131
130
-`query_in_direction(rect_min_x, rect_min_y, rect_max_x, rect_max_y, direction_x, direction_y, distance, results)``(f64)` - Find boxes intersecting a rectangle's movement path
0 commit comments