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

Home » Public Forums » archive » Re: Randomize array order
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: Randomize array order [message #54990 is a reply to message #54988] Fri, 27 July 2007 14:29 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
David Streutker wrote:
...
> If there are only 2^32 possible sequences, then why is the internal
> state characterized by a 36-element array?
>
> IDL> test = randomu(seed)
> IDL> help, seed
> SEED LONG = Array[36]

That is a VERY good question. I only looked at the documentation; I
didn't bother to check. The documentation says:

> The state of the random number generator is contained in a long integer vector.

and also

> If the Seed argument is:
> * an undefined variable - the generic state is used and the resulting generic state array is stored in the variable.

Given that the resulting generic state appears to be a 36-element
array, I don't think both statements can be true. An array of 36 longs
would be more than enough to generate all possible shuffles of a 52-
card deck. More importantly, it's large enough to do large numerical
simulations in quantum field theory without introducing spurious
correlations. Therefore I hope that the second statement is the one
that's correct.
[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
Read Message
Read Message
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: Re: Routine for Converting DN to Radiance to Temperature
Next Topic: Re: Socket server in > IDL 6.3

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

Current Time: Wed Oct 08 18:16:51 PDT 2025

Total time taken to generate the page: 0.00273 seconds