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

Home » Public Forums » archive » vectorization challenge! (help!)
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 challenge! (help!) [message #54913 is a reply to message #54844] Wed, 18 July 2007 13:37 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
There is at least some help I can offer here.

instead of:
if randomu(seed,1) lt cutoff then begin
you can make an array of the random numbers to use in the decision as
a mask and take it out of the loop
swap_mask = randomu(seed, npeeps) lt cutoff
this has the advantage f being a byte array so it is small.

Once you have this mask you only need to loop over the 1's in the mask
which is at least fewer steps.

That is as much as my brain has this second but maybe this will spark
something for you.

Brian



------------------------------------------------------------ ---------------------
Brian Larsen
Boston University
Center for Space Physics
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: warp_tri()
Next Topic: Re: how can idl find out information of other softwares

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

Current Time: Mon Dec 01 15:18:17 PST 2025

Total time taken to generate the page: 1.59868 seconds