de.lmu.ifi.dbs.elki.distance
Class IntegerDistance
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractDistance<D>
de.lmu.ifi.dbs.elki.distance.NumberDistance<IntegerDistance>
de.lmu.ifi.dbs.elki.distance.IntegerDistance
- All Implemented Interfaces:
- Distance<IntegerDistance>, Loggable, Externalizable, Serializable, Comparable<IntegerDistance>
public class IntegerDistance
- extends NumberDistance<IntegerDistance>
- Author:
- Arthur Zimek
- See Also:
- Serialized Form
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
serialVersionUID
private static final long serialVersionUID
- Created serial version UID.
- See Also:
- Constant Field Values
value
private int value
IntegerDistance
public IntegerDistance()
IntegerDistance
public IntegerDistance(int value)
getDoubleValue
public double getDoubleValue()
- Description copied from class:
NumberDistance
- Returns the double value of this distance.
- Specified by:
getDoubleValue
in class NumberDistance<IntegerDistance>
- Returns:
- the double value of this distance
- See Also:
NumberDistance.getDoubleValue()
hashCode
public int hashCode()
- The hashcode is the internal integer value of this distance.
- Specified by:
hashCode
in class AbstractDistance<IntegerDistance>
- See Also:
AbstractDistance.hashCode()
externalizableSize
public int externalizableSize()
- Description copied from interface:
Distance
- Retuns the number of Bytes this distance uses if it is written to
an external file.
- Returns:
- the number of Bytes this distance uses if it is written to
an external file
- See Also:
Distance.externalizableSize()
minus
public IntegerDistance minus(IntegerDistance distance)
- Description copied from interface:
Distance
- Returns a new Distance by subtracting the given distance
from this distance.
- Parameters:
distance
- the distance to be subtracted from this distance
- Returns:
- a new Distance by subtracting the given distance
from this distance
- See Also:
Distance.minus(de.lmu.ifi.dbs.elki.distance.Distance)
plus
public IntegerDistance plus(IntegerDistance distance)
- Description copied from interface:
Distance
- Returns a new distance as sum of this distance and the given distance.
- Parameters:
distance
- the distancce to be added to this distance
- Returns:
- a new distance as sum of this distance and the given distance
- See Also:
Distance.plus(de.lmu.ifi.dbs.elki.distance.Distance)
compareTo
public int compareTo(IntegerDistance o)
- Compares this distance with the specified distance
for order. Returns a negative integer, zero, or a positive integer
as this distance is less than, equal to, or greater than the specified distance.
- See Also:
Comparable.compareTo(java.lang.Object)
readExternal
public void readExternal(ObjectInput in)
throws IOException
- Throws:
IOException
- See Also:
Externalizable.readExternal(java.io.ObjectInput)
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Throws:
IOException
- See Also:
Externalizable.writeExternal(java.io.ObjectOutput)