Dists#

class Dists(obj=None, *args, base_seed=None, sim=None)[source]#

Bases: prettyobj

Class for managing a collection of Dist objects

Methods

init(obj=None, base_seed=None, sim=None, force=False)[source]#

Set the base seed, find and initialize all distributions in an object

In practice, the object is usually a Sim, but can be anything.

check_seeds()[source]#

Check that no two distributions share the same seed

jump(to=None, delta=1, force=False)[source]#

Advance all RNGs, e.g. to call “to”, by jumping

jump_dt(ti=None, force=False)[source]#

Advance all RNGs to the next timestep

Parameters:

ti (int) – if specified, jump to this timestep (default: current sim timestep)

reset()[source]#

Reset each RNG

copy_to_module(module)[source]#

Copy the Sim’s Dists object to the specified module