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

Home » Public Forums » archive » quick search of array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
quick search of array [message #44571] Thu, 23 June 2005 09:36
tanqian is currently offline  tanqian
Messages: 1
Registered: June 2005
Junior Member
Hi,

I have four arraies

all_time = fltarr(10000)
all_location = fltarr(3, 10000)

sel_time = fltarr(4000)
sel_location = fltarr(3,4000)

the 'sel_time' is a subset of 'all_time'. Is there a quick way I could
find index 'j' of all_time for each sel_time(i) (when
abs(all_time(j)-sel_time(i)) lt 1e-5)? So I could use that index to
pick the sel_location from all_location for each sel_time(i). Since I
have multiple(~20000) such tests, loop through both of them will be too
time consuming.

Should I sort both all_time and sel_time to descent/ascent order to
speed it up?

Thanks,

Qian
Qian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How does IDL find functions?
Next Topic: Re: quick search of array

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

Current Time: Wed Oct 08 17:08:27 PDT 2025

Total time taken to generate the page: 0.00470 seconds