peersim.reports
Class Clustering

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

public class Clustering
extends GraphObserver

Control to observe the clustering coefficient.

See Also:
GraphAlgorithms.clustering(peersim.graph.Graph, int)

Parameter Summary
n
          The number of nodes to collect info 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
Clustering(java.lang.String name)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Prints information about the clustering coefficient.
 
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 collect info about. Defaults to the size of the graph.

Constructor Detail

Clustering

public Clustering(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 the clustering coefficient. It uses "n" nodes to collect statistics. The output is produced by IncrementalStats.toString(), over the values of the clustering coefficients of the given number of nodes. Clustering coefficients are calculated by GraphAlgorithms.clustering(peersim.graph.Graph, int).

Returns:
always false