peersim.dynamics
Class RandNI

java.lang.Object
  extended by peersim.dynamics.RandNI
All Implemented Interfaces:
NodeInitializer

public class RandNI
extends java.lang.Object
implements NodeInitializer

Initializes the neighbor list of a node with random links.


Parameter Summary
protocol
          The protocol to operate on.
k
          The number of samples (with replacement) to draw to initialize the neighbor list of the node.
pack
          If this config property is defined, method Linkable.pack() is invoked on the specified protocol at the end of the wiring phase.
 
Constructor Summary
RandNI(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 void initialize(Node n)
          Takes "k" random samples with replacement from the nodes of the overlay network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

protocol

The protocol to operate on.


k

The number of samples (with replacement) to draw to initialize the neighbor list of the node.


pack

If this config property is defined, method Linkable.pack() is invoked on the specified protocol at the end of the wiring phase. Default to false.

Constructor Detail

RandNI

public RandNI(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

initialize

public void initialize(Node n)
Takes "k" random samples with replacement from the nodes of the overlay network. No loop edges are added.

Specified by:
initialize in interface NodeInitializer