DiGraph.addArc
- DiGraph.addArc(*args)
Add an arc from tail to head.
- Parameters:
tail (
int) – the id of the tail nodehead (
int) – the id of the head node
- Raises:
pyagrum.InvalidNode – If head or tail does not belong to the graph nodes.
- Return type:
None
Example
import pyagrum as gum
g = gum.DiGraph()
a, b = g.addNode(), g.addNode()
g.addArc(a, b)
g.arcs()
# {(0, 1)}
Class
Overridden in
ChainGraph.addArc, DAG.addArc, MixedGraph.addArc, PDAG.addArc