Thanks, everybody.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit
On Nov 17, 9:09 am, Tiago Reul wrote:
> Suppose that you have the position of each person in the world.
> Position is the pair (latitude, longitude).
>
> How to represent the data so that I can find the nearest person
> from a point (φ,λ) without comparing to every pair in the collection?
This is
On Nov 17, 7:09 am, Tiago Reul wrote:
> Suppose that you have the position of each person in the world.
> Position is the pair (latitude, longitude).
>
> How to represent the data so that I can find the nearest person
> from a point (φ,λ) without comparing to every pair in the collection?
The s
This is quite closely related to boids: http://www.red3d.com/cwr/
Simply put, each boid is aware of its near neighbours: not just the
nearest one, but all that are nearer than some chosen distance. For
that, the space is divided into partitions that keep track of the
boids that are are within it, a
At it simplest, you could use a spatial partitioning structure of some
sort - I'm guessing a quadtree would be more than perfect in this
case. It would cut down your search time to O(lg(n)).
The problem becomes a bit more complicated if you assume the people
can move (well - that's obvious, but ma