Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
usr
/
lib
/
python2.4
/
Upload File :
New :
File
Dir
//proc/self/root/usr/lib/python2.4/whrandom.pyo
mò ‚=5Dc @ su d Z d k Z e i d e ƒ d f d „ ƒ YZ e ƒ Z e i Z e i Z e i Z e i Z e i Z e i Z d S( s" Wichman-Hill random number generator. Wichmann, B. A. & Hill, I. D. (1982) Algorithm AS 183: An efficient and portable pseudo-random number generator Applied Statistics 31 (1982) 188-190 see also: Correction to Algorithm AS 183 Applied Statistics 33 (1984) 123 McLeod, A. I. (1985) A remark on Algorithm AS 183 Applied Statistics 34 (1985),198-200 USE: whrandom.random() yields double precision random numbers uniformly distributed between 0 and 1. whrandom.seed(x, y, z) must be called before whrandom.random() to seed the generator There is also an interface to create multiple independent random generators, and to choose from other ranges. Multi-threading note: the random number generator used here is not thread-safe; it is possible that nearly simultaneous calls in different theads return the same random value. To avoid this, you have to use a lock around all calls. (I didn't want to slow this down in the serial case by using a lock here.) Ns? the whrandom module is deprecated; please use the random modulet whrandomc B se t Z d d d d „ Z d d d d „ Z d „ Z d „ Z d „ Z d „ Z d d e d d „ Z RS( Ni c C s | i | | | ƒ d S( sˆ Initialize an instance. Without arguments, initialize from current time. With arguments (x, y, z), initialize from them.N( t selft seedt xt yt z( R R R R ( ( t /usr/lib/python2.4/whrandom.pyt __init__- s c C s… t | ƒ t | ƒ j o"