UndiGraph.clear

UndiGraph.clear()

Remove all the nodes and edges from the graph.

Return type:

None

Example

import pyagrum as gum

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

Class

UndiGraph

Overridden in

CliqueGraph.clear, MixedGraph.clear