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

Home » Public Forums » archive » Re: Efficient comparison of 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: Efficient comparison of arrays [message #9775 is a reply to message #9685] Mon, 11 August 1997 00:00 Go to previous messageGo to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
> Here is another solution that was posted on this newsgroup several years
> ago. I found it useful enough to keep around. The header credits the
> creators.
>
> Dave
>
> END


Unfortunately, this is even slower than David's routine for all but the
tiniest of vectors, and is ridiculously slow for large vectors
(depending on the memory in your machine), since it requires two arrays
of size N^2 where N is the length of the vector. It is clearly not the
best solution to the stated problem (finding common elements, not
necessarily their repitition count or location in the vectors). The
contain() function I gave in my other post is a much faster
alternative. For repitition counts and positions, where_array is more
useful.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array statistics
Next Topic: Problems with draw widget scrolling in IDL 5.0

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

Current Time: Thu Oct 09 22:11:54 PDT 2025

Total time taken to generate the page: 0.88504 seconds