CPDAG.existsEdge

CPDAG.existsEdge(first, second)
Parameters:
  • first (int) – the id of a node

  • second (int) – the id of another node

Returns:

True if the edge first-second exists (see edges())

Return type:

bool

Example

import pyagrum as gum

cpdag = gum.CPDAG.fromDAG(gum.fastDAG("A->B->C;D->C"))
cpdag.existsEdge(1, 0), cpdag.existsEdge(1, 2)
# (True, False)

Used by

CPDAG, EssentialGraph

Inheritance diagram of pyagrum.CPDAG, pyagrum.EssentialGraph