complete_graph#
- graph_tool.generation.complete_graph(N, self_loops=False, directed=False)[source]#
Generate complete graph.
- Parameters:
- N
int
Number of vertices.
- self_loopsbool (optional, default:
False
) If
True
, self-loops are included.- directedbool (optional, default:
False
) If
True
, a directed graph is generated.
- N
- Returns:
- complete_graph
Graph
A complete graph.
- complete_graph
References
[complete]Examples
>>> g = gt.complete_graph(30) >>> pos = gt.sfdp_layout(g, cooling_step=0.95, epsilon=1e-2) >>> gt.graph_draw(g, pos=pos, output="complete.pdf") <...>