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 java.lang.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 LinkWeigherDEFAULT_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.WeightgetInitialWeight()org.onlab.graph.WeightgetNonViableWeight()org.onlab.graph.Weightweight(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:
weightin interfaceorg.onlab.graph.EdgeWeigher<TopologyVertex,TopologyEdge>
-
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>
-
-