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 #80597 is a reply to message #80595] Fri, 22 June 2012 08:14 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <ada6c25c-b056-4578-8d10-f9fb2fa9694d@googlegroups.com>,
antar3s86@gmail.com 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
[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: Sat Oct 11 17:26:57 PDT 2025

Total time taken to generate the page: 1.41930 seconds