PDAG.eraseArc

PDAG.eraseArc(n1, n2)

Remove an arc from the graph.

Parameters:
  • n1 (int) – the id of the tail node

  • n2 (int) – the id of the head node

Raises:

pyagrum.InvalidArc – if the arc does not exist

Return type:

None

Example

import pyagrum as gum

pdag = gum.fastPDAG("A->B-C")
pdag.eraseArc(0, 1)
print(pdag)
# {0<A>,1<B>,2<C>} , {} , {1--2}

Used by

PDAG, ChainGraph

Inheritance diagram of pyagrum.PDAG, pyagrum.ChainGraph