public class HopCountLinkWeigher extends java.lang.Object implements LinkWeigher
Modifier and Type | Field and Description |
---|---|
static LinkWeigher |
DEFAULT_HOP_COUNT_WEIGHER |
Constructor and Description |
---|
HopCountLinkWeigher()
Creates a new hop-count weight.
|
HopCountLinkWeigher(double indirectLinkCost)
Creates a new hop-count weight with the specified cost of indirect links.
|
Modifier and Type | Method and 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(TopologyEdge edge)
Returns the weight of the given edge.
|
public static final LinkWeigher DEFAULT_HOP_COUNT_WEIGHER
public HopCountLinkWeigher()
public HopCountLinkWeigher(double indirectLinkCost)
indirectLinkCost
- indirect link costpublic Weight weight(TopologyEdge edge)
EdgeWeigher
weight
in interface EdgeWeigher<TopologyVertex,TopologyEdge>
edge
- edge to be weighedpublic Weight getInitialWeight()
EdgeWeigher
getInitialWeight
in interface EdgeWeigher<TopologyVertex,TopologyEdge>
public Weight getNonViableWeight()
EdgeWeigher
getNonViableWeight
in interface EdgeWeigher<TopologyVertex,TopologyEdge>