public final class AdapterLinkWeigher extends DefaultEdgeWeigher<TopologyVertex,TopologyEdge> implements LinkWeigher
Weight
-based
link weigher.DEFAULT_HOP_WEIGHT, DEFAULT_INITIAL_WEIGHT, HOP_WEIGHT_VALUE, NULL_WEIGHT_VALUE
Modifier and Type | Method and Description |
---|---|
static LinkWeigher |
adapt(LinkWeight lw)
Transforms double-based link weigher to
Weight -based weigher. |
Weight |
weight(TopologyEdge edge)
Returns the weight of the given edge.
|
getInitialWeight, getNonViableWeight
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInitialWeight, getNonViableWeight
public Weight weight(TopologyEdge edge)
EdgeWeigher
weight
in interface EdgeWeigher<TopologyVertex,TopologyEdge>
weight
in class DefaultEdgeWeigher<TopologyVertex,TopologyEdge>
edge
- edge to be weighedpublic static LinkWeigher adapt(LinkWeight lw)
Weight
-based weigher.lw
- double-based weigherWeight
-based weigher