Random Graph#

class RandomRealization(random_node)#

Bases: object

Realization of a random node.


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

property seed: int#

Seed of the random realization.

Returns: A signed integer representing the random seed.


Initialize a new generator from the realized random seed.

Returns: A new numpy generator object.

Return type:


class RandomNode(mother_node=None, seed=None)#

Bases: object

Random Node within a random dependency graph.

  • 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.

property is_random_root: bool#

Is this random node a root node?


Boolean root node indicator.

Return type:

is_root (bool)

property seed: int | None#

Random seed of this node.

Returns: Random seed. None if no seed was specified.

property random_mother: RandomNode | None#

The mother node of this random number generator.

Note that setting the mother node will convert any random node to a child node!


The mother node. None if this node is a root.

Return type:

mother_node (Optional[RandomNode])