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

Home » Public Forums » archive » Array intersections
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array intersections [message #11165] Thu, 26 February 1998 00:00 Go to previous message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
I'm sure there were some clever responses to this same question
just a few months ago, but for the life of me I cannot recall
what they were. Here's the question:

What is the most efficient way (using IDL, of course) to return
the index at which two arrays intersect? e.g.

a = [ 1B, 2B, 9B, 5B, 6B, 11B ]
b = [ 5B, 6B ]
idx = intersect( a, b )
idx = 3

This is a highly simplified example, but the point is that I want
a function that will accept two array inputs (byte arrays in my specific
case) and return to me the index in array a where the subset b starts.

Refresh my memory, please.

--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
[Message index]
 
Read Message
Read Message
Previous Topic: Time test on SGI Octane
Next Topic: Re: Wanted: colour table good for high contrast grayscale output

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

Current Time: Wed Oct 08 15:33:12 PDT 2025

Total time taken to generate the page: 0.00484 seconds