5.2.5. Distribution

Encapsulate the choices a distribution makes, and provide a factory to get the right one dynamically.

Distribution.new_distribution(name, args, seed=None, use_speed=True)

Factory for creating new Distribution instances.

Parameters:

  • name: the name of the random distribution to use at the core of this instance

  • args: the arguments instances of that distribution require

  • seed: optionally what to use as the initial seed to the RNG

  • use_speed: allow this distribution to be overridden by the speed parameter in the config file, use a distribution based on that speed instead of the random one asked for