MPDAG.parents

MPDAG.parents(node)
Parameters:

node (int) – the id of a node

Returns:

the parents of the node

Return type:

set[int]

Example

import pyagrum as gum

mpdag = gum.MPDAG.meekClosure(gum.fastPDAG("A-B->C-D"))
mpdag.parents(3)
# {2}

Class

MPDAG