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

Home » Public Forums » archive » fast search
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
fast search [message #50819] Tue, 17 October 2006 05:09 Go to previous message
m.goullant@gmail.com is currently offline  m.goullant@gmail.com
Messages: 10
Registered: July 2006
Junior Member
Hi there,

I have the following problem:

;data structure of an irregular point cloud
x = points.x
y = points.y
z = points.z

search radio
radio = 8

FOR i=0L,N_ELEMENTS(z)-1 DO BEGIN

square = WHERE(x LE x[i] + radio AND x GE x[i] - radio AND y LE
y[i] + radio AND y GE y[i] - radio)
;(...)

ENDFOR

I realize that WHERE will do the job, but at very low efficiency.
WHERE
makes no assumptions about the list being ordered. It seems to me it
has
to check every element of the array, requiring N steps for an N-element
array

There is a faster way to do this?

thanks,
Marie
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: a slip of the fingers
Next Topic: Re: resolving specific pro, functions inside of a file

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

Current Time: Wed Oct 08 19:19:58 PDT 2025

Total time taken to generate the page: 0.00465 seconds