|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.gm.GraphMetricBase<V,E>
bcds.phison.gm.Diameter<V,E>
bcds.phison.gm.AvgPathLength<V,E>
public class AvgPathLength<V,E>
Computes the average of the shortest path lengths in the
topology, where the link weights are all 1 (hop count).
It reuses Diameter
so that getGraphMetric returns
Diameter.getAvgShortestPath.
Note that it is wasteful to run both Diameter and
AvgPathLength, because the same computations are performed
twice, but only the caller might know of that situation or be able
to avoid it.
Constructor Summary | |
---|---|
AvgPathLength()
Default constructor. |
|
AvgPathLength(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 average path length. |
double |
getGraphMetricStdev()
Returns the average path length. |
java.lang.String |
getLabel()
Returns the string {@literal "Avg. |
Methods inherited from class bcds.phison.gm.Diameter |
---|
getAvgShortestPath, getAvgShortestPathStdev, getEnvParams, getLongestPath, isApplicableTo, 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, isApplicableTo, run, setup |
Methods inherited from interface bcds.phison.WithEnvParams |
---|
getEnviron, getEnvParams, getName |
Constructor Detail |
---|
public AvgPathLength()
public AvgPathLength(SimGraph<V,E> g, Environ env)
Method Detail |
---|
public double getGraphMetric()
getGraphMetric
in interface GraphMetric<V,E>
getGraphMetric
in class Diameter<V,E>
public double getGraphMetricStdev()
getGraphMetricStdev
in interface GraphMetric<V,E>
getGraphMetricStdev
in class GraphMetricBase<V,E>
public java.lang.String getLabel()
getLabel
in interface GraphMetric<V,E>
getLabel
in class Diameter<V,E>
public java.lang.String getDescription()
getDescription
in interface GraphMetric<V,E>
getDescription
in class Diameter<V,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |