Two objects are interacting (Object Alpha, Object Beta)
Each contain a point (x,y) which will be used to make comparisons, among other things.
Object Alpha's point (x,y) attribute is dynamic and will change.
Object Beta's point (x,y) attribute is final.
I need to construct a data structure that contains all Object Beta's.
I was thinking of some sort of multidirectional arraylist with an index corresponding to the values of the point attribute so I can simply iterate backward and forwards to find the closest Beta's within a given range, however, how would I construct a datastructure like this?
Perhaps a linked multidimensional array? Although this would be incredibly complex when one adds or removes elements.
Any other thoughts?
Use case - Object Beta essentially is an object occupying an object in real space. Ie, it's point attribute corresponds to it's GPS location. Object Alpha is another object in real space and it's point attribute also corresponds to a GPS location. I want to quickly find the closest x amount of Beta's to Alpha's present location. Also add and remove Beta from this structure without completely redefining the entire structure. There could potentially be 1000+ object Beta's in this data structure.