- graphscope.nx.generators.community.caveman_graph(l, k)#
Returns a caveman graph of l cliques of size k.
l (int) – Number of cliques
k (int) – Size of cliques
G – caveman graph
- Return type:
This returns an undirected graph, it can be converted to a directed graph using
nx.to_directed(), or a multigraph using
nx.MultiGraph(nx.caveman_graph(l, k)). Only the undirected version is described in  and it is unclear which of the directed generalizations is most useful.
>>> G = nx.caveman_graph(3, 3)