pub type WS<T, R> = SmallWorldWS<T, R>;
Expand description

short for SmallWorldWS

See SmallWorldWS for the implemented traits

Implementations

Returns neigbor distance of the initial ring

A neighbor distance of 1 means, in the original ring structure every node is connected to its two nearest neigbors, a neighbor distance of 2 means, it is connected to its 4 nearest neigbors and so on

The graph will contain neighbor_distance * system size (i.e. graph.vertex_count()) connections

retunrs rewire probability the ensemble is set to

On average, a fraction of rewire_prob nodes should be rewired

Initialize a WS - a small-world ensemble
  • n is the system size, i.e., how many nodes there should be in the created graphs
  • neighbor_distance is needed for the initial ring structure. See also WS::neigbor_distance
  • rewire_probability - each edge will be rewired with a probability of rewire_probability - see also WS::rewire_prob
  • rng - random number generator