Package org.onosproject.net.topology
Class GeoDistanceLinkWeight
- java.lang.Object
-
- org.onosproject.net.topology.GeoDistanceLinkWeight
-
- All Implemented Interfaces:
org.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>,LinkWeigher
public class GeoDistanceLinkWeight extends java.lang.Object implements LinkWeigher
Link weight for measuring link cost using the geo distance between link vertices as determined by the element longitude/latitude annotation.
-
-
Constructor Summary
Constructors Constructor Description GeoDistanceLinkWeight(DeviceService deviceService)Creates a new link-weight with access to the specified device service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.onlab.graph.WeightgetInitialWeight()org.onlab.graph.WeightgetNonViableWeight()org.onlab.graph.Weightweight(TopologyEdge edge)
-
-
-
Constructor Detail
-
GeoDistanceLinkWeight
public GeoDistanceLinkWeight(DeviceService deviceService)
Creates a new link-weight with access to the specified device service.- Parameters:
deviceService- device service reference
-
-
Method Detail
-
getInitialWeight
public org.onlab.graph.Weight getInitialWeight()
- Specified by:
getInitialWeightin interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
getNonViableWeight
public org.onlab.graph.Weight getNonViableWeight()
- Specified by:
getNonViableWeightin interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
weight
public org.onlab.graph.Weight weight(TopologyEdge edge)
- Specified by:
weightin interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
-