MPDAG.existsEdge

MPDAG.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

mpdag = gum.MPDAG.meekClosure(gum.fastPDAG("A-B->C-D"))
mpdag.existsEdge(1, 0), mpdag.existsEdge(1, 2)
# (True, False)

Class

MPDAG