peersim.vector
Class PeakDistribution

java.lang.Object
  extended by peersim.vector.VectControl
      extended by peersim.vector.PeakDistribution
All Implemented Interfaces:
Control

public class PeakDistribution
extends VectControl

Initializes the values so that "peaks" nodes have value "value"/"peaks", the rest "background" (zero by default).

See Also:
VectControl, peersim.vector

Parameter Summary
value
          The sum of values in the system, to be equally distributed between peak nodes.
background
          The value for the nodes that are not peaks.
peaks
          The number of peaks in the system.
 
Parameters inherited from class peersim.vector.VectControl
protocol, setter, getter
 
Field Summary
 
Fields inherited from class peersim.vector.VectControl
getter, setter
 
Constructor Summary
PeakDistribution(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Initializes the values so that "peaks" nodes have value "value"/"peaks", the rest zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

value

The sum of values in the system, to be equally distributed between peak nodes.


background

The value for the nodes that are not peaks. This parameter is optional, by default, the nodes that are not peaks are set to zero. This value overrides that behavior.


peaks

The number of peaks in the system. If this value is greater than or equal to 1, it is interpreted as the actual number of peaks. If it is included in the range [0, 1] it is interpreted as a percentage with respect to the current network size. Defaults to 1.

Constructor Detail

PeakDistribution

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

execute

public boolean execute()
Initializes the values so that "peaks" nodes have value "value"/"peaks", the rest zero.

Returns:
always false