Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance
Interface Distance<D extends Distance<D>>

All Superinterfaces:
Comparable<D>, Externalizable, Serializable
All Known Implementing Classes:
AbstractDistance, BitDistance, CorrelationDistance, DoubleDistance, FloatDistance, IntegerDistance, NumberDistance, PreferenceVectorBasedCorrelationDistance, SubspaceDistance

public interface Distance<D extends Distance<D>>
extends Comparable<D>, Externalizable

The interface Distance defines the requirements of any instance class.

Author:
Arthur Zimek

Method Summary
 String description()
          Returns a String as description of this Distance.
 int externalizableSize()
          Retuns the number of Bytes this distance uses if it is written to an external file.
 D minus(D distance)
          Returns a new Distance by subtracting the given distance from this distance.
 D plus(D distance)
          Returns a new distance as sum of this distance and the given distance.
 String toString()
          Any implementing class should implement a proper toString-method for printing the result-values.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Method Detail

plus

D plus(D 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

minus

D minus(D 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

description

String description()
Returns a String as description of this Distance.

Returns:
a String as description of this Distance

toString

String toString()
Any implementing class should implement a proper toString-method for printing the result-values.

Overrides:
toString in class Object
Returns:
String a human-readable representation of the Distance

externalizableSize

int externalizableSize()
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

Release 0.1 (2008-07-10_1838)