bcds.phison.gm
Class MaxNodeDegree<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.MaxNodeDegree<V,E>
All Implemented Interfaces:
GraphMetric<V,E>, WithEnvParams

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

Returns the highest node degree of a topology as a GraphMetric.

Author:
mmanzano

Constructor Summary
MaxNodeDegree()
          Default constructor.
MaxNodeDegree(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 highest node degree of the topology.
 double getGraphMetricStdev()
          Returns NaN (Not-a-Number) to avoid the getGraphMetricStdev() of AvgPathLength.
 java.lang.String getLabel()
          Returns "MaxNodeDegree".
 boolean isApplicableTo(MetricTarget m)
          Returns true if m is MetricTarget.GRAPH.
 
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, getNodeMetric, run, setup
 
Methods inherited from interface bcds.phison.WithEnvParams
getEnviron, getEnvParams, getName
 

Constructor Detail

MaxNodeDegree

public MaxNodeDegree()
Default constructor.


MaxNodeDegree

public MaxNodeDegree(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 highest node degree of the topology.

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

getGraphMetricStdev

public double getGraphMetricStdev()
Returns NaN (Not-a-Number) to avoid the getGraphMetricStdev() of AvgPathLength.

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

getLabel

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

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>