peersim.dynamics
Class WireWS

java.lang.Object
  extended by peersim.dynamics.WireGraph
      extended by peersim.dynamics.WireWS
All Implemented Interfaces:
Control

public class WireWS
extends WireGraph

Takes a Linkable protocol and adds connections following the small-world model of Watts and Strogatz. Note that no connections are removed, they are only added. So it can be used in combination with other initializers.

See Also:
GraphFactory.wireWS(peersim.graph.Graph, int, double, java.util.Random)

Parameter Summary
beta
          The beta parameter of a Watts-Strogatz graph represents the probability for a node to be re-wired.
k
          The degree of the graph.
 
Field Summary
 
Fields inherited from class peersim.dynamics.WireGraph
g, pid, undir
 
Constructor Summary
WireWS(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 void wire(Graph g)
          calls GraphFactory.wireWS(peersim.graph.Graph, int, double, java.util.Random).
 
Methods inherited from class peersim.dynamics.WireGraph
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

beta

The beta parameter of a Watts-Strogatz graph represents the probability for a node to be re-wired. Passed to GraphFactory.wireWS(peersim.graph.Graph, int, double, java.util.Random).


k

The degree of the graph. See GraphFactory.wireRingLattice(peersim.graph.Graph, int). Passed to GraphFactory.wireWS(peersim.graph.Graph, int, double, java.util.Random).

Constructor Detail

WireWS

public WireWS(java.lang.String prefix)
Standard constructor that reads the configuration parameters. Invoked by the simulation engine.

Parameters:
prefix - the configuration prefix for this class
Method Detail

wire

public void wire(Graph g)
calls GraphFactory.wireWS(peersim.graph.Graph, int, double, java.util.Random).

Specified by:
wire in class WireGraph