D
- the type of Distance usedpublic interface Distance<D extends Distance<D>> extends Comparable<D>, Externalizable
DistanceUtil
for related utility
functions such as min
, max
.DistanceUtil
Modifier and Type | Method and Description |
---|---|
int |
externalizableSize()
Returns the number of Bytes this distance uses if it is written to an
external file.
|
D |
infiniteDistance()
Provides an infinite distance.
|
boolean |
isInfiniteDistance()
Returns true, if the distance is an infinite distance, false otherwise.
|
boolean |
isNullDistance()
Returns true, if the distance is a null distance, false otherwise.
|
boolean |
isUndefinedDistance()
Returns true, if the distance is an undefined distance, false otherwise.
|
D |
minus(D distance)
Returns a new Distance by subtracting the given distance from this
distance.
|
D |
nullDistance()
Provides a null distance.
|
D |
parseString(String pattern)
Provides a measurement suitable to this measurement function based on the
given pattern.
|
D |
plus(D distance)
Returns a new distance as sum of this distance and the given distance.
|
String |
requiredInputPattern()
Returns a String as description of the required input format.
|
String |
toString()
Any implementing class should implement a proper toString-method for
printing the result-values.
|
D |
undefinedDistance()
Provides an undefined distance.
|
compareTo
readExternal, writeExternal
D plus(D distance)
distance
- the distance to be added to this distanceD minus(D distance)
distance
- the distance to be subtracted from this distanceString toString()
D parseString(String pattern) throws IllegalArgumentException
pattern
- a pattern defining a similarity suitable to this measurement
functionIllegalArgumentException
- if the given pattern is not compatible
with the requirements of this measurement functionString requiredInputPattern()
int externalizableSize()
D infiniteDistance()
D nullDistance()
D undefinedDistance()
boolean isInfiniteDistance()
boolean isNullDistance()
boolean isUndefinedDistance()