MixedGraph.clear

MixedGraph.clear()

Remove all the nodes and edges from the graph.

Return type:

None

Example

import pyagrum as gum

g = gum.fastMixedGraph("A->B-C")
g.clear()
g.size(), g.sizeArcs(), g.sizeEdges()
# (0, 0, 0)

Used by

MixedGraph, ChainGraph, PDAG

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