public interface Weight extends java.lang.Comparable<Weight>
Modifier and Type | Method and Description |
---|---|
boolean |
isNegative()
Returns true if the weight is negative (means that aggregated
path cost will decrease if we add weighted subject to it).
|
boolean |
isViable()
Returns true if the weighted subject (link/path) can be traversed; false otherwise.
|
Weight |
merge(Weight otherWeight)
Merges the given weight with this one returning a new aggregated
weight.
|
Weight |
subtract(Weight otherWeight)
Subtracts the given weight from this one and produces a new weight.
|
Weight merge(Weight otherWeight)
otherWeight
- weight to addWeight subtract(Weight otherWeight)
otherWeight
- weight to subtractboolean isViable()
boolean isNegative()