3 ms·
Just thinking a little bit about this problem, there is an easy to code, precise and top performance algorithm for solving the following two problems: 1) findi
by noreasonw 11y ago
Just thinking a little bit about this problem, there is an easy to code, precise and top performance algorithm for solving the following two problems:
1) finding the points Pi within a certain distance d0 of a fixed point P0 in your database
2) finding the nearest point Pmin to P0, with Pmin in your database.
I will keep it for myself, but as a hint here are two steps:
first: read the John Cook article about deriving the distance formula, and second: think and easy way of avoiding unneeded computation.
It took me just a minute to realize the correct way to solve the OP, so it shouldn't take you long to solve it.