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

Home » Public Forums » archive » Re: Can this be vectorized?
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: Can this be vectorized? [message #17454 is a reply to message #17445] Tue, 26 October 1999 00:00 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
John E. Davis, davis@space.mit.edu writes:

> What is the best way to vectorize this?

In IDL an alternative to vectorisation is to use the fast built-in
function HISTOGRAM. In your case you should take the histogram of 'I'
and use the REVERSE_INDICES keyword to get a list of which elements
are in which bin. Summing the same elements of 'X' will give you the
answer you want. This will work even if 'I' and 'X' are not in
ascending order. There is some memory overhead, but it is of the same
order as creating working copies of your original data.


Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Object graphics axis
Next Topic: 'ffff'x is negative in 5.2 positive in 5.2.1

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

Current Time: Sun Nov 30 02:17:22 PST 2025

Total time taken to generate the page: 1.12206 seconds