bcds.phison.gm
Class AverageNeighborConnectivity<V,E>

java.lang.Object
  extended by bcds.phison.gm.GraphMetricBase<V,E>
      extended by bcds.phison.gm.AverageNeighborConnectivity<V,E>
All Implemented Interfaces:
GraphMetric<V,E>, WithEnvParams

public class AverageNeighborConnectivity<V,E>
extends GraphMetricBase<V,E>
implements GraphMetric<V,E>

Computes the average neighbor connectivity of a topology as a GraphMetric.

The average neighbor connectivity provides information about 1-hop neighborhoods around a node. It is a summary statistic of the Joint Degree Distribution (JDD) and it is calculated as the average neighbor degree of the average k-degree node.

Additionally, it provides the JDD although that functionality is not accessible through the GraphMetric interface.

Reference: P. Mahadevan, D. Krioukov, M. Fomenkov, X. Dimitropoulos, k. c. claffy, and A. Vahdat, "The internet as-level topology: three data sources and one definitive metric," SIGCOMM Comput. Commun. Rev., vol. 36, pp. 17–26, January 2006.

Author:
mmanzano

Constructor Summary
AverageNeighborConnectivity()
          Default constructor.
AverageNeighborConnectivity(SimGraph<V,E> g, Environ env)
          Creates a new instance and calls setup to complete the initialization.
 
Method Summary
 java.lang.String getDescription()
          Returns a string describing the metric, for example, article where it has been published, URL where to find reference implementation, etc.
 double getGraphMetric()
          Returns the average neighbor connectivity.
 double getGraphMetricStdev()
          Returns the standard deviation of the average neighbor connectivity.
 java.lang.String getLabel()
          Returns the string "Avg. neighbor connectivity".
 boolean isApplicableTo(MetricTarget m)
          Returns true if m is MetricTarget.GRAPH or NODE.
 double[][] JDD()
          This method computes the joint degree distribution: The probability, that a randomly selected edge connects k_1 and k_2 degree nodes.
 void run()
          Performs the computation of the average neighbor connectivity.
 
Methods inherited from class bcds.phison.gm.GraphMetricBase
dump, getEdgeMetric, getEnviron, getEnvParams, getGraph, getName, getNodeMetric, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bcds.phison.gm.GraphMetric
dump, getEdgeMetric, getNodeMetric, setup
 
Methods inherited from interface bcds.phison.WithEnvParams
getEnviron, getEnvParams, getName
 

Constructor Detail

AverageNeighborConnectivity

public AverageNeighborConnectivity()
Default constructor.


AverageNeighborConnectivity

public AverageNeighborConnectivity(SimGraph<V,E> g,
                                   Environ env)
Creates a new instance and calls setup to complete the initialization.

Method Detail

isApplicableTo

public boolean isApplicableTo(MetricTarget m)
Returns true if m is MetricTarget.GRAPH or NODE.

Specified by:
isApplicableTo in interface GraphMetric<V,E>
Overrides:
isApplicableTo in class GraphMetricBase<V,E>

run

public void run()
Performs the computation of the average neighbor connectivity.

Specified by:
run in interface GraphMetric<V,E>
Overrides:
run in class GraphMetricBase<V,E>

getGraphMetric

public double getGraphMetric()
Returns the average neighbor connectivity.

Specified by:
getGraphMetric in interface GraphMetric<V,E>
Overrides:
getGraphMetric in class GraphMetricBase<V,E>

getGraphMetricStdev

public double getGraphMetricStdev()
Returns the standard deviation of the average neighbor connectivity.

Specified by:
getGraphMetricStdev in interface GraphMetric<V,E>
Overrides:
getGraphMetricStdev in class GraphMetricBase<V,E>

getLabel

public java.lang.String getLabel()
Returns the string "Avg. neighbor connectivity".

Specified by:
getLabel in interface GraphMetric<V,E>

getDescription

public java.lang.String getDescription()
Description copied from interface: GraphMetric
Returns a string describing the metric, for example, article where it has been published, URL where to find reference implementation, etc.

Specified by:
getDescription in interface GraphMetric<V,E>

JDD

public double[][] JDD()
This method computes the joint degree distribution: The probability, that a randomly selected edge connects k_1 and k_2 degree nodes. jdd(k1,k2) = m(k1,k2)/M, with M = #Edges and m(k1,k2) = #Edges connecting nodes with degree i and j. This method can not be accessed using the GraphMetric interface.