Class GeoDistanceLinkWeight

  • All Implemented Interfaces:
    org.onlab.graph.EdgeWeigher<TopologyVertex,​TopologyEdge>, LinkWeigher

    public class GeoDistanceLinkWeight
    extends 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 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:
        getInitialWeight in interface org.onlab.graph.EdgeWeigher<TopologyVertex,​TopologyEdge>
      • getNonViableWeight

        public org.onlab.graph.Weight getNonViableWeight()
        Specified by:
        getNonViableWeight in interface org.onlab.graph.EdgeWeigher<TopologyVertex,​TopologyEdge>