comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Assign data point to n-Dimensional grid
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Assign data point to n-Dimensional grid [message #80595 is a reply to message #80594] Fri, 22 June 2012 08:38 Go to previous messageGo to previous message
antar3s86 is currently offline  antar3s86
Messages: 8
Registered: June 2012
Junior Member
On Friday, June 22, 2012 5:14:01 PM UTC+2, Kenneth P. Bowman wrote:
>
>> Hi
>>
>> I face a serious problem in the development of my algorithm.In principle it
>> is very simple:
>>
>> I have a data point in a 9-dimensional parameter space (say,
>> x1,x2,x3,y1,y2,y3,z1,z2,z3) with x,y,z being physical quantities with
>> different units. Furthermore, I have an unequally spaced 9-dimensional
>> reference grid and all i have to do is to compute which grid point is closest
>> to my data point with respect to all 9 dimensions.
>>
>> I have to do this several billion times, so I really want to make sure to do
>> it as fast as possible.
>>
>> Any help with that?
>>
>> cheers
>
> Is your grid separable? That is, does the x-coordinate of
> each grid point depend only on x? If it does, you can find
> the index of each nearest neighbor independently of the others.
>
> If your grids are regular, you should be able to compute the
> nearest neighbor index. Something like this
>
> i = ROUND(nx*(x - xmin)/(xmax - xmin))
>
> If your grids are not regular (not evenly spaced), use
> VALUE_LOCATE to do a binary search.
>
> If your grids are not separable, you have a much more difficult
> problem.
>
> Ken Bowman

Hi

Thanks a lot! My grid is unequally spaced but separable and I think VALUE_LOCATE was just the thing i have been looking for.

You saved my day (or better: week)

cheers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: developing idl applications for use with Siemens e.soft with broker activities
Next Topic: SPLIT numbers into sub-numbers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:06:55 PDT 2025

Total time taken to generate the page: 0.00227 seconds