peersim.reports
Class DegreeStats

java.lang.Object
  extended by peersim.reports.GraphObserver
      extended by peersim.reports.DegreeStats
All Implemented Interfaces:
Control

public class DegreeStats
extends GraphObserver

Prints several statistics about the node degrees in the graph.


Parameter Summary
n
          The number of nodes to be used for sampling the degree.
trace
          If defined, then the given number of nodes will be traced.
method
          Selects a method to use when printing results.
linktype
          Selects the types of links to print information about.
 
Parameters inherited from class peersim.reports.GraphObserver
undir
 
Field Summary
 
Fields inherited from class peersim.reports.GraphObserver
g, ga, name, pid, undir
 
Constructor Summary
DegreeStats(java.lang.String name)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Prints statistics about node degree.
 
Methods inherited from class peersim.reports.GraphObserver
updateGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

n

The number of nodes to be used for sampling the degree. Defaults to full size of the graph.


trace

If defined, then the given number of nodes will be traced. That is, it is guaranteed that in each call the same nodes will be picked in the same order. If a node being traced fails, its degree will be considered 0. Not defined by default.


method

Selects a method to use when printing results. Three methods are known: "stats" will use IncrementalStats.toString(). "freq" will use IncrementalFreq.print(java.io.PrintStream). "list" will print the degrees of the sample nodes one by one in one line, separated by spaces. Default is "stats".


linktype

Selects the types of links to print information about. Three methods are known: "live": links pointing to live nodes, "dead": links pointing to nodes that are unavailable and "all": both dead and live links summed. "all" and "dead" require parameter "undir" to be unset (graph must be directed). Default is "live".

Constructor Detail

DegreeStats

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

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

execute

public boolean execute()
Prints statistics about node degree. The format of the output is specified by "method". See also the rest of the configuration parameters.

Returns:
always false