Conversation
- Minor formatting improvements across multiple files - Refactored `RTree` `knn_search` logic to fix redundant tuple syntax
…ection to main README for clarity.
- Introduced 2D and 3D point support with corresponding tests - Expanded `BoundingVolume` trait with `overlap` and `margin` methods
- Updated `kNN` and `range_search` methods to accept a generic `DistanceMetric`. - Unified benchmarks and tests to explicitly utilize `EuclideanDistance`. - Demonstrated `ManhattanDistance` implementation in examples.
- Implemented bulk insertion benchmarks for Quadtree, Octree, KdTree, RTree, and RStarTree in 2D and 3D. - Updated tests to validate bulk insertion for all supported spatial tree structures. - Refactored Python examples to use bulk insertion methods. - Adjusted benchmark parameters for consistency and added new criterion configuration.
- Implemented serialization and deserialization for Quadtree, Octree, KdTree, RTree, and RStarTree using `serde`. - Added serialization examples to Python and Rust examples. - Created comprehensive unit tests and benchmarks for serialization and deserialization. - Refactored code to ensure compatibility with the new serialization features.
…pand README examples - Implemented benchmark functions for bounding box range search using R*-tree in 2D and 3D. - Updated the `benches` group to include new benchmark tests. - Expanded README with detailed usage examples for bulk insertion, querying, and serialization across all spatial tree structures.
…nd serialization sections into the main README.
- Clarified installation and usage descriptions in the main README. - Updated `pyspart/README.md` to improve example references and reorganize content.
- Included Spart logo at the top of the README. - Added an acknowledgements section for logo attribution.
- Added details about Spart's Python bindings, including installation and usage instructions. - Enhanced README with notes on supported features, development status, and additional documentation references. - Improved formatting for concepts and debugging sections.
- Added extensive test cases for `knn_search`, `range_search`, and `delete` operations, including edge cases for various tree structures (Quadtree, Octree, KDTree, RTree, and RStarTree). - Documented new tree behaviors and edge cases in the main and PySpart READMEs. - Updated `knn_search` to handle `k=0` gracefully across all trees.
- Simplified and streamlined insertion process for clarity and reduced redundancy. - Added `unreachable!` checks to enforce boundary logic consistency.
- Implemented robust delete logic for managing node underflows by reinserting orphaned entries. - Introduced `min_entries` field to enforce minimum occupancy during deletions. - Expanded test suite to validate underflow scenarios and ensure correctness across edge cases.
- Introduced forced reinsertion mechanism to handle node overflows during insertion, improving tree balancing. - Refactored insertion logic to include recursive handling of overflows and node splitting. - Added a test case to validate forced reinsertion behavior and tree height stability.
…l errors with `unwrap` - Updated all `new` constructors in tree structures (RTree, RStarTree, Quadtree, Octree, and KdTree) to explicitly handle potential `Result` types using `.unwrap()`. - Adjusted benchmarks, tests, and Python bindings to match the new safety mechanism. - Simplified error management during tree initialization.
- Refactored delete and insert benchmarks to use explicit `iter_with_setup` for clearer setup and execution separation. - Removed intermediate `info!` logging from KNN and range search benchmarks for cleaner output. - Increased `BENCH_NUM_INSERT` to 10,000 for more comprehensive test coverage.
…_common` - Moved shared algorithms (delete, range search, KNN, MBR computation) into `rtree_common` module. - Unified `EntryAccess` and `NodeAccess` traits to abstract R-tree and R*-tree implementations. - Simplified RTree and RStarTree structures by delegating common functionality to `rtree_common`. - Removed duplicated code and added reusable trait implementations.
- Simplified `RTree` and `RStarTree` implementations by eliminating the need for the `Ord` trait on point data. - Replaced tuple-based k-NN heap with `HeapItem` struct to handle ties and maintain consistent ordering. - Adjusted k-NN search logic for both 2D and 3D variants to integrate with the new heap structure.
…es and streamline ownership semantics across spatial trees, tests, and benchmarks.
- Added `r_star_tree.py` example to demonstrate 2D and 3D R*-tree usage for k-NN and range searches. - Introduced `bench_serialization` module and integrated it into the benchmarking suite for testing serialization performance.
…nd RStarTree - Simplified k-NN heap logic by replacing the custom `OrdDist` implementation with `OrderedFloat<f64>`. - Reduced redundancy and improved consistency across spatial tree structures.
- Renamed `r_star_tree.py` to `rstar_tree.py` for consistency. - Added Python quick-start and per-example run instructions in `pyspart/examples/README.md`. - Updated Rust `examples/README.md` with an entry for R*-tree. - Updated root `README.md` to include Python R*-tree examples and steps. - Extended Makefile to include `rstar_tree.py` in `make run-py-examples`.
…DME.md` for detailed usage info
…-tree and R-tree - Moved `compute_group_mbr` and `search_node` functions to a shared module (`rtree_common`) to improve code reuse. - Updated `compute_group_mbr` to return `Option` for safer handling of empty inputs. - Replaced unwraps with safe handling (`if let` and `expect`) for bounding volume computations. - Simplified k-NN and range query implementations for readability.
… across spatial trees and update related tests and assertions
…nd Python GIL for safe cloning; simplify k-NN and range query mappings by removing redundant clones.
…icking - Updated `BSPBounds` trait to return `Result` for `center` and `extent` methods. - Replaced `panic!` with `Err` for invalid dimensions in `Rectangle`, `Cube`, and related implementations. - Adjusted `KdPoint` trait and implementations to return `Result` for `coord` method. - Replaced unwraps with proper error handling in R*-tree and k-d tree logic for coordinate and center access.
…andling and dimension inference - Removed `new(k)` constructor in favor of `new()` with inferred dimensions. - Added `DimensionMismatch` error for insertions with incompatible dimensions. - Updated insert and bulk insert methods to return `Result` instead of panicking. - Adjusted tests and examples to align with new KdTree API.
- Removed unused benchmark functions and `dead_code` warnings. - Simplified KdTree insert methods to improve error handling and comply with new API updates. - Streamlined benchmark definitions to remove unnecessary helpers and reduce verbosity.
- Removed dimension parameter from `KdTree::new()` for consistency with updated API. - Updated insert methods to use `Result` handling and suppress unused values. - Simplified geometry imports in benchmarks by removing unused types.
- Updated `insert_bulk` in Python bindings to suppress unused value warnings. - Added k-NN search functionality (`knn_search`) to 2D and 3D R-trees in examples. - Enhanced test cases with assertions for k-NN search in 2D and 3D R-trees. - Updated README to indicate missing features in Python bindings.
…, Manhattan distance, and structured initialization examples
- Added `.github/FUNDING.yml` with GitHub sponsor details. - Updated pre-commit configuration to include explicit `pre-commit` stages for format and lint hooks.
…tions for insertion and k-NN search logic
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
==========================================
+ Coverage 65.40% 72.79% +7.39%
==========================================
Files 7 10 +3
Lines 1240 1908 +668
==========================================
+ Hits 811 1389 +578
- Misses 429 519 +90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
habedi
added a commit
that referenced
this pull request
Aug 26, 2025
habedi
added a commit
that referenced
this pull request
Oct 3, 2025
habedi
added a commit
that referenced
this pull request
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This revision adds the R*-tree implementation. It also refactors existing spatial trees. The changes improve performance, safety, and the API.
Resulttypes for safer error handling.