I agree with Alistair; a pattern like EventSourcing works well for building efficient query structures for a set of data along different as-yet-to-be-determined dimensions.

In Pharo terms, you can implement this using a EventStream that announces new entries, then install announcement handlers each updating a dimension-specific data structure.

Also makes it easy to add new dimensions if you find you need them; simply add a new handler and replay the EventStream  (with the other handlers temporarily disabled).

Cheers,
Henry


On 23 Apr 2016, at 2:13 , C��drick B��ler <cdrick65@gmail.com> wrote:

Hi Alistair,

Thanks, this sounds like a nice suggestion. 

I have to think about it. 
Adding altitude would be also interesting in some cases but not as a start (quite limited usage).

When you say to package it separately, you���re talking about Geolocation, Spatiotemporal classes ? or also the collection ?
I can try something but I think this will deserve more �� computational thinking �� power than I have ^^

Cheers,

C��drik

Le 23 avr. 2016 �� 13:57, Alistair Grant <akgrant0710@gmail.com> a ��crit :

I don't have a data structures book handy, but how about 3 SortedCollections?  (Assuming 3 dimensions: latitude, longitude & time).

It would support a reasonably efficient binary search, and allow for areas and time ranges.

Regardless of which solution you choose I agree that it would be a useful general class, so please package it separately.

Cheers,
Alistair
(Sent from my mobile)

On 23/04/2016 1:47 PM, "C��drick B��ler" <cdrick65@gmail.com> wrote:
A dictionary with keys being the timestamp or the spatiotemporal object would probably do it...
I think I���ll do that but I wonder if there are better solutions out there ^^.

Cheers,

C��drik