MixedGraph.eraseNode

MixedGraph.eraseNode(node)

Erase the node and all the related arcs and edges.

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

  • node (int)

Return type:

None

Example

import pyagrum as gum

g = gum.fastMixedGraph("A->B-C")
g.eraseNode(1)
g.nodes(), g.arcs(), g.edges()
# ({0, 2}, set(), set())

Used by

MixedGraph, ChainGraph, PDAG

Inheritance diagram of pyagrum.MixedGraph, pyagrum.ChainGraph, pyagrum.PDAG