Random Graph

The random graph provides a way to link the random number generators of multiple objects in order to set global seeds for reproducibility.

class RandomNode(mother_node=None, seed=None)[source]

Bases: object

Random Node within a random dependency graph.

Parameters:
  • mother_node (RandomNode, optional) – Mother node of this random node. By default, nodes are considered to be roots.

  • seed (int, optional) – Random seed used to initialize the pseudo-random number generator.

class RandomRealization(random_node)[source]

Bases: object

Realization of a random node.

Parameters:

random_node (RandomNode) – Random node from which to generate a realization.

generator()[source]

Initialize a new generator from the realized random seed.

Returns: A new numpy generator object.

Return type:

Generator

property seed: int

Seed of the random realization.

Returns: A signed integer representing the random seed.