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

Home » Public Forums » archive » Re: 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
Re: fast search [message #50889 is a reply to message #50818] Thu, 19 October 2006 04:01 Go to previous messageGo to previous message
m.goullant@gmail.com is currently offline  m.goullant@gmail.com
Messages: 10
Registered: July 2006
Junior Member
Hi Paolo,

thanks for the article, i'll read cautiously!

regards,
Marie

Paolo Grigis wrote:
> This link may be useful to you:
>
> http://www.dfanning.com/code_tips/pts_in_sphere.html
>
> Ciao,
> Paolo
>
>
> m.goullant@gmail.com wrote:
>> 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
Read Message
Previous Topic: Re: vector of bin indices using histogram?
Next Topic: Re: Weirdest Error Ever

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

Current Time: Wed Oct 08 17:46:41 PDT 2025

Total time taken to generate the page: 0.00408 seconds