graphscope.nx.generators.classic.turan_graph¶
- graphscope.nx.generators.classic.turan_graph(n, r)[source]¶
Return the Turan Graph
The Turan Graph is a complete multipartite graph on
nodes with disjoint subsets. That is, edges connect each node to every node not in its subset.Given
and , we create a complete multipartite graph with partitions of size , rounded down, and partitions of size , rounded down.- Parameters:
n (int) – The number of nodes.
r (int) – The number of partitions. Must be less than or equal to n.
Notes
Must satisfy
. The graph has edges, rounded down.