de.lmu.ifi.dbs.elki.algorithm.clustering
Class SLINK.SLinkDistance
java.lang.Object
de.lmu.ifi.dbs.elki.algorithm.clustering.SLINK.SLinkDistance
- All Implemented Interfaces:
- Comparable<SLINK.SLinkDistance>
- Enclosing class:
- SLINK<O extends DatabaseObject,D extends Distance<D>>
public class SLINK.SLinkDistance
- extends Object
- implements Comparable<SLINK.SLinkDistance>
Encapsulates the distance between two objects and their ids.
distance
D extends Distance<D> distance
id1
Integer id1
id2
Integer id2
SLINK.SLinkDistance
public SLINK.SLinkDistance(D distance,
Integer id1,
Integer id2)
compareTo
public int compareTo(SLINK.SLinkDistance o)
Compares this object with the specified object for order.
Returns a negative integer, zero, or a positive integer as this object is less
than, equal to, or greater than the specified object.
- Specified by:
compareTo
in interface Comparable<SLINK.SLinkDistance>
- Parameters:
o
- the Object to be compared.
- Returns:
- a negative integer, zero, or a positive integer as this
object is less than, equal to, or greater than the specified
object.
getDistance
public D getDistance()
- Returns the distance value.
- Returns:
- the distance value
toString
public String toString()
- Returns a string representation of the object.
- Overrides:
toString
in class Object
- Returns:
- a string representation of the object.