Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [january-dev] Dataset resize function

Hi Pierre,

 

You’re welcome. SetByBoolean sets the dataset at each position where the selection dataset is true to the object value’s (or item at the position if the given object is a dataset). Note, this does not support broadcasting at the moment.

 

Regards,

Peter

 

 

From: january-dev-bounces@xxxxxxxxxxx [mailto:january-dev-bounces@xxxxxxxxxxx] On Behalf Of sachot.pierre@xxxxxxxxxxx
Sent: 23 May 2017 16:24
To: january developer discussions <january-dev@xxxxxxxxxxx>
Subject: Re: [january-dev] Dataset resize function

 

Hi Peter,

 

Thanks a lot for the quick reply, I have now an other problem, I don't understand what's the setByBoolean() function do, could you explain it to me ?

 

Best regards,

 

Sachot Pierre.

 


De: "Peter Chang" <Peter.Chang@xxxxxxxxxxxxx>
À: january-dev@xxxxxxxxxxx
Envoyé: Mardi 23 Mai 2017 14:29:41
Objet: Re: [january-dev] Dataset resize function

 

 

Hi Pierre,

 

Resize() changes the shape and size of the dataset and copies the old contents in row-major order. So yes, if your new shape has a smaller size then values will be lost.

 

GetUniqueItems() returns values only once whereas sort() can contain values which are the same. So for [0,0,-1,2] the former returns 3 values and the latter 4.

 

Regards,

Peter

 

 

 

From: january-dev-bounces@xxxxxxxxxxx [mailto:january-dev-bounces@xxxxxxxxxxx] On Behalf Of sachot.pierre@xxxxxxxxxxx
Sent: 23 May 2017 14:04
To: january-dev@xxxxxxxxxxx
Subject: Re: [january-dev] Dataset resize function

 

Dear Peter, 

 

sorry to disturb you again, but I don't understand the difference between getUniqueItems() and sort() because it's returning to me the same result...

 

Thanks a lot.

 

Best regards.

 

Sachot Pierre

 


De: "sachot pierre" <sachot.pierre@xxxxxxxxxxx>
À: january-dev@xxxxxxxxxxx
Envoyé: Mardi 23 Mai 2017 13:45:31
Objet: Dataset resize function

 

Dear Peter, 

 

I would like to know what is the difference between a resize and a Slice, because here:

 

double[] obj = new double[] { 4.2, -7.9, 6.10, 0.0 };

Dataset input = DatasetFactory.createFromObject(class1, obj);
input.resize(1,2);
System.out.println(input.toString(true));

 

This is showing me: Dataset [[4,1999998, -7,9000001]]

So I lose some values by doing the resize, is it like a Slice?

 

Thanks a lot,

 

Best regards.

 

Sachot Pierre.

 

 

-- 

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

 

 

-- 

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
 


Back to the top