aryagraph.generators.classic.turan_graph#

aryagraph.generators.classic.turan_graph(n: int, r: int, *, directed: bool = False) → Graph[source]#

Turán graph T(n, r): complete r-partite graph with parts as equal as possible.

The n mod r larger parts come last, as in networkx. It is the densest graph on n nodes without a K_{r+1}.