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

Home » Public Forums » archive » Finding strings values common to two (large!) arrays
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: Finding strings values common to two (large!) arrays [message #92198 is a reply to message #92197] Wed, 28 October 2015 12:26 Go to previous messageGo to previous message
Russell[1] is currently offline  Russell[1]
Messages: 101
Registered: August 2011
Senior Member
Yeah, I learned that trick from your posts on Fanning's webpage. It's been a revelation. But i still don't like the structure of:

id = id[uniq(id,sort(id))]

i wish uniq just had a built-in flag to do this for me... Under what circumstance would I want to *NOT* sort? Seems like if they just built uniq to sort by default, you could probably optimize this at the compiler level --- though I'm hardly an expert...

id = id[uniq(id)] ;would be nice or just

-R



On Wednesday, October 28, 2015 at 12:40:24 PM UTC-4, Jeremy Bailin wrote:
> On Wednesday, October 28, 2015 at 12:25:10 PM UTC-4, rrya...@gmail.com wrote:
>> On Wednesday, October 7, 2015 at 10:13:59 AM UTC-4, rj...@le.ac.uk wrote:
>>> I have arrays of numerical IDs in string format.
>>>
>>> I want to find all of the indices in Array A that contain a value that is present anywhere in Array B.
>>>
>>> The arrays are both quite large (>1 million values) so a loop is out of the question and them being strings complicates it as well.
>>>
>>> Any IDL Way tips?
>>
>> AGGH! Jeremy beat me to it. I would think you want to map your strings onto the unique set of integers following Jeremy's post. Then perhaps you could use histogram on the mapped integers.
>>
>> -Russell
>
> You know I'm not going to miss a chance to spread the gospel of value_locate! :)
>
> -Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: point on an image()
Next Topic: Histogram within a colorbar

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

Current Time: Wed Oct 08 20:09:12 PDT 2025

Total time taken to generate the page: 0.29638 seconds