public class HopCountLinkWeight extends java.lang.Object implements LinkWeight
Constructor and Description |
---|
HopCountLinkWeight()
Creates a new hop-count weight.
|
HopCountLinkWeight(int indirectLinkCost)
Creates a new hop-count weight with the specified cost of indirect links.
|
Modifier and Type | Method and Description |
---|---|
double |
weight(TopologyEdge edge)
Returns the weight of the given edge.
|
public HopCountLinkWeight()
public HopCountLinkWeight(int indirectLinkCost)
indirectLinkCost
- indirect link costpublic double weight(TopologyEdge edge)
LinkWeight
weight
in interface LinkWeight
edge
- edge to be weighed