- All Implemented Interfaces:
- TopologyGenerator
public class RandomNewmanWattsStrogatzTopologyGenerator
extends RandomizedTopologyTransform
From the SageMath documentation: First create a ring over n nodes. Then each
node in the ring is connected with its k nearest neighbors. Then shortcuts
are created by adding new edges as follows: for each edge u-v in the
underlying 'n-ring with k nearest' neighbors'; with probability p add a new
edge u-w with" + "randomly-chosen existing node w. Takes a non-empty graph as
input.