DiGraph.completeGraphļ
- static DiGraph.completeGraph(n)ļ
Create a complete directed graph with n nodes.
- Parameters:
n (
int) ā number of nodes- Returns:
directed graph with nodes 0..n-1 and an arc iāj for every i<j (a complete DAG: every pair of nodes is linked by one arc)
- Return type:
Example
import pyagrum as gum
g = gum.DiGraph.completeGraph(3)
g.nodes()
# {0, 1, 2}
sorted(g.arcs())
# [(0, 1), (0, 2), (1, 2)]
Used by

Overridden in