"Marcus G. Daniels" wrote:
> One way to avoid having agents reason in absolute space is to have all
> agents inherit from an abstract base class that does these collection
> procedures in one place, e.g. a getNeighbor (radius), method. That
> way you can hide the coordinate system of the space from the derived
> classes.
"Darren Schreiber" wrote:
"While I illustrate that with the canvas and graph, the search of the
space is
done by parsing through the lists of agents and is independent of the
display issues."
Suppose I wanted to create a Grid2dContinous class, with basically the
same interface as Grid2d, except inside there I want to use a "better
faster" collection object into which the objects are placed. I want to
more quickly find all agents within r units of (x,y).
getNeighbor(radius) is terribly slow if it has to cycle through a whole
list of agents (as Darren can probably testify).
At least, we want to take some subset of the agents before checking if
they are within r units.