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

Home » Public Forums » archive » Vectorization question
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: Vectorization question [message #21757 is a reply to message #21705] Fri, 15 September 2000 00:00 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Liam E. Gumley, Liam.Gumley@ssec.wisc.edu writes:

> How would I vectorize the following operation
>
> for i = 0, n_elements(x) - 1 do a[x[i]] = a[x[i]] + b[i]

I've often wondered if IDL could be modified internally to allow
an implicit loop where the loop variable is only used for indexing
arrays. I've hit several situations where I want to do this sort of
thing, but don't want to write external routines and don't have the
memory to use the 2D trick.

Oh well.


Struan
PS: I tried hard to use HISTOGRAM, but just ended up looping
through the reverse indices array, which a priori is no faster.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spherical gridding at a pole
Next Topic: Re: CW_BGROUP

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

Current Time: Sun Oct 12 22:28:20 PDT 2025

Total time taken to generate the page: 1.35941 seconds