PDAG.eraseChildren

PDAG.eraseChildren(n)

Erase all arcs from a node to its children.

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

  • n (int)

Return type:

None

Example

import pyagrum as gum

pdag = gum.fastPDAG("A->B;A->C;A-D")
pdag.eraseChildren(0)  # the edge A-D is kept
print(pdag)
# {0<A>,1<B>,2<C>,3<D>} , {} , {0--3}

Used by

PDAG, ChainGraph

Inheritance diagram of pyagrum.PDAG, pyagrum.ChainGraph