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

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

public class Heterogeneity<V,E>
extends AvgPathLength<V,E>
implements GraphMetric<V,E>

Computes the heterogeneity of a topology as a GraphMetric. Heterogeneity is calculated as: \frac{AvgPathLength Stdev}{AvgPathLength}

Author:
mmanzano

Constructor Summary
Heterogeneity()
          Default constructor.
Heterogeneity(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 description of this metric.
 double getGraphMetric()
          Returns the heterogeneity of the topology.
 java.lang.String getLabel()
          Returns "Heterogeneity".
 boolean isApplicableTo(MetricTarget m)
          Returns true if m is MetricTarget.GRAPH.
 
Methods inherited from class bcds.phison.gm.AvgPathLength
getGraphMetricStdev
 
Methods inherited from class bcds.phison.gm.Diameter
getAvgShortestPath, getAvgShortestPathStdev, getEnvParams, getLongestPath, run, setup
 
Methods inherited from class bcds.phison.gm.GraphMetricBase
dump, getEdgeMetric, getEnviron, getGraph, getName, getNodeMetric
 
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, getGraphMetricStdev, getNodeMetric, run, setup
 
Methods inherited from interface bcds.phison.WithEnvParams
getEnviron, getEnvParams, getName
 

Constructor Detail

Heterogeneity

public Heterogeneity()
Default constructor.


Heterogeneity

public Heterogeneity(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.

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

getGraphMetric

public double getGraphMetric()
Returns the heterogeneity of the topology.

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

getLabel

public java.lang.String getLabel()
Returns "Heterogeneity".

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

getDescription

public java.lang.String getDescription()
Description copied from class: AvgPathLength
Returns a description of this metric.

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