complete_graph

Contents

complete_graph#

graph_tool.generation.complete_graph(N, self_loops=False, directed=False)[source]#

Generate complete graph.

Parameters:
Nint

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.

Returns:
complete_graphGraph

A complete graph.

References

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")
<...>
../_images/complete.png

A complete graph with \(N=30\) vertices.#