Package org.onlab.graph
Interface EdgeWeigher<V extends Vertex,E extends Edge<V>>
-
- All Known Subinterfaces:
LinkWeigher
- All Known Implementing Classes:
DefaultEdgeWeigher
,GeoDistanceLinkWeight
,HopCountLinkWeigher
,MetricLinkWeight
public interface EdgeWeigher<V extends Vertex,E extends Edge<V>>
Abstraction of a graph edge weight function.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Weight
getInitialWeight()
Returns initial weight value (i.e.Weight
getNonViableWeight()
Returns weight of a link/path that should be skipped (can be considered as an infinite weight).Weight
weight(E edge)
Returns the weight of the given edge.
-
-
-
Method Detail
-
weight
Weight weight(E edge)
Returns the weight of the given edge.- Parameters:
edge
- edge to be weighed- Returns:
- edge weight
-
getInitialWeight
Weight getInitialWeight()
Returns initial weight value (i.e. weight of a "path" starting and terminating in the same vertex; typically 0 value is used).- Returns:
- null path weight
-
getNonViableWeight
Weight getNonViableWeight()
Returns weight of a link/path that should be skipped (can be considered as an infinite weight).- Returns:
- non viable weight
-
-