Randomizer¶
-
class Randomizer¶
A handy class to return random numbers.
Inheritance diagram
digraph inheritance7eea25b24f { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Randomizer" [URL="acron.core.Randomizer.html#acron.core.Randomizer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Randomizer" [arrowsize=0.75,style=""]; }- Randomizer.__init__()¶
If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.
- Randomizer.assign()¶
- static Randomizer.get_next_seed()¶
Returns a random seed value for the next global Randomizer object.
- Randomizer.get_seed()¶
Returns a unique seed value based on the seed value passed to this Randomizer object (and on its current state).
- Randomizer.random_int()¶
Returns a random integer in the range [0, range).
- Randomizer.random_real()¶
Returns a random double in the range [0, range).
- Randomizer.random_real_unit()¶
Returns a random double in the range [-0.5, 0.5).