- caveman_graph(l, k)¶
Returns a caveman graph of
lcliques of size
Number of cliques
Size of cliques
- GNetworkX Graph
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.
Watts, D. J. ‘Networks, Dynamics, and the Small-World Phenomenon.’ Amer. J. Soc. 105, 493-527, 1999.
>>> G = nx.caveman_graph(3, 3)