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

Home » Public Forums » archive » Re: Vectorizing Code
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: Vectorizing Code [message #29664 is a reply to message #29529] Thu, 28 February 2002 07:43 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <a5kg1a$i7m$1@mwrns.noaa.gov>,
"Pavel Romashkin" <pavel_romashkin@hotmail.com> wrote:

> From: "Kenneth P. Bowman" <kpb@null.com>
>
>> sa = 10.^2*EXP(-ABS(REBIN(LINDGEN(nstate), nstate, nvec, /SAMPLE) - $
>> REBIN(REFORM(LINDGEN(nvec), 1, nvec), nstate, nvec, /SAMPLE))*dz/h)
>
> I am afraid I'd rather stick with the optimized loops than something that
> takes me five minutes to figure out :-(
> Pavel

I used to feel as you, lost among the REBINs and HISTOGRAMS with
REVERSE_INDICES, but I have read the REBIN tutorial,
brothers and sisters, and I have seen the light!
(Admittedly, it was a 40 W appliance bulb.) It was understanding
the REFORM call that makes this a useful approach for me.

I was recently computing some conditional probability distributions,
and using REVERSE_INDICES sped things up by about a factor of 10
over repeated WHERE's.

To paraphrase Scott Turow, I'm just "learning to love IDL".

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Projected Image Data
Next Topic: How to move shade_surface axes?

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

Current Time: Thu Oct 09 22:31:48 PDT 2025

Total time taken to generate the page: 0.64019 seconds