Package org.onosproject.net.topology
Class HopCountLinkWeigher
- java.lang.Object
-
- org.onosproject.net.topology.HopCountLinkWeigher
-
- All Implemented Interfaces:
org.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
,LinkWeigher
public class HopCountLinkWeigher extends Object implements LinkWeigher
Link weight for measuring link cost as hop count with indirect links being as expensive as traversing the entire graph to assume the worst.
-
-
Field Summary
Fields Modifier and Type Field Description static LinkWeigher
DEFAULT_HOP_COUNT_WEIGHER
-
Constructor Summary
Constructors Constructor Description HopCountLinkWeigher()
Creates a new hop-count weight.HopCountLinkWeigher(double indirectLinkCost)
Creates a new hop-count weight with the specified cost of indirect links.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.onlab.graph.Weight
getInitialWeight()
org.onlab.graph.Weight
getNonViableWeight()
org.onlab.graph.Weight
weight(TopologyEdge edge)
-
-
-
Field Detail
-
DEFAULT_HOP_COUNT_WEIGHER
public static final LinkWeigher DEFAULT_HOP_COUNT_WEIGHER
-
-
Method Detail
-
weight
public org.onlab.graph.Weight weight(TopologyEdge edge)
- Specified by:
weight
in interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
getInitialWeight
public org.onlab.graph.Weight getInitialWeight()
- Specified by:
getInitialWeight
in interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
getNonViableWeight
public org.onlab.graph.Weight getNonViableWeight()
- Specified by:
getNonViableWeight
in interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
-