graphical_models.classes.dags.dag.DAG.outgoing_arcs

DAG.outgoing_arcs(node: Hashable) Set[Tuple[Hashable, Hashable]][source]

Return all arcs with source node.

Parameters

node – The node.

Returns

Return all arcs of the form node->j.

Return type

Set[arc]

Example

>>> from graphical_models import DAG
>>> g = DAG(arcs={(1, 2), (1, 3), (2, 3)})
>>> g.outgoing_arcs(2)
{(2, 3)}