Randomizer

from acron.core import Randomizer
class Randomizer

Bases:

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=""]; }
__init__()

If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.

assign()
static get_next_seed()

Returns a random seed value for the next global Randomizer object.

get_seed()

Returns a unique seed value based on the seed value passed to this Randomizer object (and on its current state).

random_int()

Returns a random integer in the range [0, range).

random_real()

Returns a random double in the range [0, range).

random_real_unit()

Returns a random double in the range [-0.5, 0.5).