sim.field.network.stats
Class UnitEdgeMetric

java.lang.Object
  extended by sim.field.network.stats.UnitEdgeMetric
All Implemented Interfaces:
EdgeMetric

public class UnitEdgeMetric
extends java.lang.Object
implements EdgeMetric

The UnitEdgeMetric counts each edge as having weight 1.


Field Summary
static UnitEdgeMetric defaultInstance
          A static member to be used by whomever wants to quickly send one of these as a parameter to a statistic function.
 
Constructor Summary
UnitEdgeMetric()
           
 
Method Summary
 double getWeight(Edge edge)
          The weight of an edge is 1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultInstance

public static UnitEdgeMetric defaultInstance
A static member to be used by whomever wants to quickly send one of these as a parameter to a statistic function.

Constructor Detail

UnitEdgeMetric

public UnitEdgeMetric()
Method Detail

getWeight

public double getWeight(Edge edge)
The weight of an edge is 1.

Specified by:
getWeight in interface EdgeMetric