QuadTree
QuadTree copied to clipboard
QuadTree operations
A list of all the possible operations that can be implemented
- [x] Add point
- [x] Get points in range
- [x] Get all points (can be used to optimize the above) (forEach)
- [x] Get the closest to a point (given point x will return the inserted point y with smallest distance(x, y))
- [ ] Remove point (#62)
- [ ] Remove points in range (#62)
- [ ] ~~Move point~~ see this comment
- [x] Merge quadtrees
(open for more suggestions)
what do you mean by "get the closest point"?
I suggest
- Higher-order functions:
- Execute a function on all points
- Execute a function on all points, and only if the function returns true for all points, return true
- Execute a function on all points, and only if the function returns true for at least one point, return true
- Return the first point where a given function (passed that point) returns true
- "reduce"- like function?
Closest point implemented here: #25.
I just returned to this (quite a while later!) and merged a few pull requests so this issue can be updated to reflect the current status now!
Thank you @crhallberg for continuing to help maintain this repo!