Trees  Indices  Help 



object +  _random.Random +  Random +  WichmannHill


None 


x in the interval [0, 1). 


tuple containing the current state. 


None 


None 






Inherited from Inherited from Inherited from 


VERSION = 1


Initialize internal state from hashable object. None or no argument seeds from current time or from an operating system specific randomness source if available. If a is not None or an int or long, hash(a) is used instead. If a is an int or long, a is used directly. Distinct values between 0 and 27814431486575L inclusive are guaranteed to yield distinct internal states (this guarantee is specific to the default WichmannHill generator).

Get the next random number in the range [0.0, 1.0).

Return internal state; can be passed to setstate() later.

Restore internal state from object returned by getstate().

Act as if n calls to random() were made, but quickly. n is an int, greater than or equal to 0. Example use: If you have 2 threads and know that each will consume no more than a million random numbers, create two Random objects r1 and r2, then do r2.setstate(r1.getstate()) r2.jumpahead(1000000) Then r1 and r2 will use guaranteeddisjoint segments of the full period.

Set the WichmannHill seed from (x, y, z). These must be integers in the range [0, 256). 
Seed from hashable object's hash code. None or no argument seeds from current time. It is not guaranteed that objects with distinct hash codes lead to distinct internal states. This is obsolete, provided for compatibility with the seed routine used prior to Python 2.1. Use the .seed() method instead. 
Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Fri Jun 13 23:38:56 2008  http://epydoc.sourceforge.net 