QuadTree icon indicating copy to clipboard operation
QuadTree copied to clipboard

QuadTree operations

Open MaanooAk opened this issue 6 years ago • 4 comments

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)

MaanooAk avatar Mar 27 '18 15:03 MaanooAk

what do you mean by "get the closest point"?

kleinesfilmroellchen avatar Mar 27 '18 19:03 kleinesfilmroellchen

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?

kleinesfilmroellchen avatar Mar 27 '18 20:03 kleinesfilmroellchen

Closest point implemented here: #25.

crhallberg avatar Oct 02 '18 18:10 crhallberg

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!

shiffman avatar Feb 23 '19 17:02 shiffman

Thank you @crhallberg for continuing to help maintain this repo!

shiffman avatar Oct 11 '22 15:10 shiffman