DiGraph.clear

DiGraph.clear()

Remove all the nodes and arcs from the graph.

Return type:

None

Example

import pyagrum as gum

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

Used by

DiGraph, DAG

Inheritance diagram of pyagrum.DiGraph, pyagrum.DAG

Overridden in

MixedGraph.clear