What are some good data structures for tracking agents in two-dimensional spatial modeling?
I saw some references to quadrants (which I understand) and kd trees (which I don't understand very well).
I am looking for something with which an agent can effectively say: "I know my location, and I would like to know which agents are near me (within a certain radius of myself)."
Examples (pseudo code in order) would be appreciated.
I am working in Java.
Peter source share