peersim.dynamics
Class WireKOut

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

public class WireKOut
extends WireGraph

Takes a Linkable protocol and adds random connections. Note that no connections are removed, they are only added. So it can be used in combination with other initializers.

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

Parameter Summary
k
          The number of outgoing edges to generate from each node.
 
Field Summary
 
Fields inherited from class peersim.dynamics.WireGraph
g, pid, undir
 
Constructor Summary
WireKOut(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 void wire(Graph g)
          Calls GraphFactory.wireKOut(peersim.graph.Graph, int, 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

k

The number of outgoing edges to generate from each node. Passed to GraphFactory.wireKOut(peersim.graph.Graph, int, java.util.Random). No loop edges are generated. In the undirected case, the degree of nodes will be on average almost twice as much because the incoming links also become links out of each node.

Constructor Detail

WireKOut

public WireKOut(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.wireKOut(peersim.graph.Graph, int, java.util.Random).

Specified by:
wire in class WireGraph