Defined in File WattsStrogatzGenerator.hpp
public NetworKit::StaticGraphGenerator
(Class StaticGraphGenerator)
Public Functions
Constructs a graph according to the Watts and Strogatz model (https://en.wikipedia.org/wiki/Watts_and_Strogatz_model), which produces graphs with high clustering and low average path length.
First, a regular ring lattice is generated. Then some edges are rewired randomly.
nNodes – number of nodes in target graph
nNeighbors – number of neighbors on each side of a node
p – rewiring probability