Skip to content

Commit 7cdd7b2

Browse files
committed
docs: update docs to mention generic coordinate types
1 parent 5ab6801 commit 7cdd7b2

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Rust-optimized quadtree with a clean Python API
3333
- Fast KNN and range queries
3434
- Optional object tracking for id ↔ object mapping
3535
- Fast [serialization](https://elan456.github.io/fastquadtree/benchmark/#serialization-vs-rebuild) to/from bytes
36+
- Support for multiple data types (f32, f64, i32, i64) for coordinates
3637
- [100% test coverage](https://codecov.io/gh/Elan456/fastquadtree) and CI on GitHub Actions
3738
- Offers a drop-in [pyqtree shim](https://elan456.github.io/fastquadtree/benchmark/#pyqtree-drop-in-shim-performance-gains) that is 6.567x faster while keeping the same API
3839

docs/future_features.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,19 @@ The features will likely be implemented in the order they are listed below, but
99

1010
## 🚧 Planned Features
1111

12-
### 1. Configurable Quadtree Coordinate Type
13-
14-
Currently, the point quadtree only uses f32 for point coordinates, limiting precision in favor of better performance.
15-
To make the quadtree more flexible, we could allow users to specify the coordinate type (e.g., f64, i32, etc.) when creating a quadtree.
16-
The f32 will remain the default, but users will be able to specify a different type if needed.
17-
18-
If the type cannot be made truly generic, then only the following types would be supported: f32, f64, i32, i64
19-
20-
### 2. KNN with criteria function
12+
### 1. KNN with criteria function
2113

2214
Currently, KNN only supports finding the nearest neighbors based on euclidean distance.
2315
By adding a criteria function, we could allow users to define custom criteria for finding neighbors by passing a function that
2416
takes in a point and returns a score. The KNN algorithm would then use this score to determine the nearest neighbors.
2517

26-
### 3. KNN in rectangle quadtree
18+
### 2. KNN in rectangle quadtree
2719

2820
Currently, KNN is only supported in the point quadtree. By adding KNN support to the rectangle quadtree, we could allow users to find the nearest rectangles to a given point. This would be to the nearest edge of the rectangle, adding complexity to the algorithm.
2921
However, it will allow for really quick collision detection between a point and a set of rectangles as the point can just do
3022
robust-collision handling with the nearest rectangles.
3123

32-
### 4. Circle support
24+
### 3. Circle support
3325

3426
Currently, we support points and rectangles in two separate quadtrees.
3527
For example, in the ball-pit demo, we use a point quadtree, but then query a larger area to account for the radius of the balls.
@@ -41,6 +33,15 @@ A good alternative is to use the rectangle quadtree and insert the minimum bound
4133

4234
Once a feature from above is completed, it will be moved to this section.
4335

44-
### Quadtree serialization
36+
37+
### Configurable Quadtree Coordinate Type (1.3.0)
38+
39+
Currently, the point quadtree only uses f32 for point coordinates, limiting precision in favor of better performance.
40+
To make the quadtree more flexible, we could allow users to specify the coordinate type (e.g., f64, i32, etc.) when creating a quadtree.
41+
The f32 will remain the default, but users will be able to specify a different type if needed.
42+
43+
If the type cannot be made truly generic, then only the following types would be supported: f32, f64, i32, i64
44+
45+
### Quadtree serialization (1.2.0)
4546

4647
By serializing the quadtree, we can save its state to a file and load it later. This will allow us to persist the quadtree structure and data across sessions. For example, you could pre build a quadtree with all the walls in your video game level, serialize it to a file, and then load it when the game starts. This will heavily reduce the game load time since you won't have to rebuild the quadtree from scratch every time.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- Fast KNN and range queries
4343
- Optional object tracking for id ↔ object mapping
4444
- Fast [serialization](benchmark.md#serialization-vs-rebuild) to/from bytes
45+
- Support for multiple data types (f32, f64, i32, i64) for coordinates
4546
- [100% test coverage](https://codecov.io/gh/Elan456/fastquadtree) and CI on GitHub Actions
4647

4748
## Examples

0 commit comments

Comments
 (0)