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

Home » Public Forums » archive » Cumulative max() in *arbitrary* dimension?
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: Cumulative max() in *arbitrary* dimension? [message #79587 is a reply to message #79382] Fri, 09 March 2012 09:58 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
Hi JD.

On Fri, 9 Mar 2012 08:58:44 -0800 (PST), JDS wrote:

> I replaced yours instead with the rather similar:
>
> for i=1,s[d]-1 do a[i*off]=a[(i-1)*off:i*off-1]>a[i*off:(i+1)*off-1]
>
Good point. I didn't take into account to use the loop variable within
the loop. This gives me a new idea:

for i=off,ns-off,off do a[i]=a[i-off:i-1]>a[i:i+off-1]

I didn't test it. However it is shorter and may be easier to read. I
don't really think, that it is faster, but it may be. (5 instead of 9
scalar operations within the array subscripts is not the world.) :-)

Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Quantile regression within IDL
Next Topic: Re: cgHistoPlot - locations and histdata keywords?

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

Current Time: Fri Oct 10 21:11:38 PDT 2025

Total time taken to generate the page: 1.91847 seconds