DAG.
triples
Return all triples of the form (i, j, k) such that i and k are both adjacent to j.
i
j
k
Examples
>>> import causaldag as cd >>> g = cd.DAG(arcs={(1, 3), (2, 3), (1, 2)}) >>> g.triples() {frozenset({1, 3, 2})}