V
- vertex typeE
- edge typepublic class DefaultEdgeWeigher<V extends Vertex,E extends Edge<V>> extends java.lang.Object implements EdgeWeigher<V,E>
ScalarWeight
type.Modifier and Type | Field and Description |
---|---|
static ScalarWeight |
DEFAULT_HOP_WEIGHT
Default weight based on hop count.
|
static ScalarWeight |
DEFAULT_INITIAL_WEIGHT
Default initial weight.
|
protected static double |
HOP_WEIGHT_VALUE
Common weight value for any link.
|
protected static double |
NULL_WEIGHT_VALUE
Weight value for null path (without links).
|
Constructor and Description |
---|
DefaultEdgeWeigher() |
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(E edge)
Returns the weight of the given edge.
|
protected static final double HOP_WEIGHT_VALUE
protected static final double NULL_WEIGHT_VALUE
public static final ScalarWeight DEFAULT_HOP_WEIGHT
public static final ScalarWeight DEFAULT_INITIAL_WEIGHT
public Weight weight(E edge)
EdgeWeigher
public Weight getInitialWeight()
EdgeWeigher
getInitialWeight
in interface EdgeWeigher<V extends Vertex,E extends Edge<V>>
public Weight getNonViableWeight()
EdgeWeigher
getNonViableWeight
in interface EdgeWeigher<V extends Vertex,E extends Edge<V>>