peersim.reports
Class ConnectivityObserver

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

public class ConnectivityObserver
extends GraphObserver

Reports statistics about connectivity properties of the network, such as weakly or strongly connected clusters.


Parameter Summary
stats
          The parameter used to request cluster size statistics instead of the usual list of clusters.
type
          Defines the types of connected clusters to discover.
 
Parameters inherited from class peersim.reports.GraphObserver
undir
 
Field Summary
 
Fields inherited from class peersim.reports.GraphObserver
g, ga, name, pid, undir
 
Constructor Summary
ConnectivityObserver(java.lang.String name)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Prints information about clusters.
 
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

stats

The parameter used to request cluster size statistics instead of the usual list of clusters. Not set by default.


type

Defines the types of connected clusters to discover. Possible values are Defaults to "wcc".

Constructor Detail

ConnectivityObserver

public ConnectivityObserver(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 information about clusters. If parameter "stats" is defined then the output is produced by IncrementalStats.toString(), over the sizes of the clusters. Otherwise one line is printed that contains the string representation of a map, that holds cluster IDs mapped to cluster sizes. The meaning of the cluster IDs is not specified, but is printed for debugging purposes.

Returns:
always false
See Also:
GraphAlgorithms.tarjan(peersim.graph.Graph), GraphAlgorithms.weaklyConnectedClusters(peersim.graph.Graph)