Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [january-dev] Question about IDataset

Hi Peter,

Let's consider an example:

    Dataset ds1 = DatasetFactory.createFromObject(Dataset.OBJECT, Arrays.asList(new PressureVsDepth(100, 2000), new PressureVsDepth(110, 2500)));   
    Dataset ds2 = DatasetFactory.createFromObject(Dataset.OBJECT, Arrays.asList(new PressureVsDepth(15, 2000), new PressureVsDepth(20, 2500)));

If I try to do ds1.iadd(ds2), it throws unsupported operation exception.
So if I understand correctly the idea here is to subclass the ObjectDataset and implement the various arithmetic operations, like iadd, imultiply, etc? And the objects in the dataset would be of some wrapper class (PressureVsDepth), holding two values, like pressure vs depth or time.

Thanks,
Dinko

On Wed, Jan 18, 2017 at 11:20 AM, <Peter.Chang@xxxxxxxxxxxxx> wrote:

Hi Dinko,

 

As you say, compound datasets do not support items that comprise elements of different type. So far we have concentrated on primitive arrays as these are memory-efficient in Java.

 

One possibility is to use ObjectDataset – we will need to add Java generic support (allow you to create subclasses of ObjectDataset<T>) for that to be useful. Otherwise, you use separate datasets for each of your quantities.

 

I’m not sure what you mean by “indexed”. Do you mean finding all positions in a nD volume of, say, depth is a given value? Then, you can write a position iterator loop which checks that depth dataset and adds the positions to a list.

 

Regards,

Peter

 

 

From: january-dev-bounces@eclipse.org [mailto:january-dev-bounces@eclipse.org] On Behalf Of Matthew Gerring
Sent: 17 January 2017 19:29
To: january developer discussions <january-dev@xxxxxxxxxxx>
Subject: Re: [january-dev] Question about IDataset

 

Hi Dinko,

 

This issue has come up before. I will ask Peter Chang what his recommended approach is. We will get back to you this evening or maybe tomorrow UK time.

 

Cheerio,

 

Matt

 

On 17 January 2017 at 19:22, Dinko Ivanov <dinko.ivanov@xxxxxxxxx> wrote:

Hi,

I'm working on an Eclipse RCP-based application that performs some statistical and numerical analysis on data. So far I'm using some in-house data structures for that, but I recently learned about the January project and I'd like to evaluate it.

My question is: how do I handle "indexed" datasets in January, where each value is a double measurement against some index - time, altitude, depth, etc? I tried using a CompoundDataset, but it requires nested datasets to be of the same time. Could you give some hints?

 

Thanks and best regards!

Dinko


_______________________________________________
january-dev mailing list
january-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/january-dev

 

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


_______________________________________________
january-dev mailing list
january-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/january-dev



Back to the top