MarkedGraph.isDefinitelyDirected

MarkedGraph.isDefinitelyDirected(x, y)

Return True if the edge x-y is definitely directed from x to y.

An edge is definitely directed from x to y when x has a tail and y has an arrowhead.

Parameters:
  • x (int)

  • y (int)

Return type:

bool

Example

import pyagrum as gum

g = gum.fastMarkedGraph("A->B;B o-> C")
g.isDefinitelyDirected(0, 1), g.isDefinitelyDirected(1, 0)
# (True, False)
g.isDefinitelyDirected(1, 2)
# False

Used by

MarkedGraph, PAG

Inheritance diagram of pyagrum.MarkedGraph, pyagrum.PAG