Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering
Class SLINK.SLinkDistance

java.lang.Object
  extended by 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.


Field Summary
(package private)  D distance
           
(package private)  Integer id1
           
(package private)  Integer id2
           
 
Constructor Summary
SLINK.SLinkDistance(D distance, Integer id1, Integer id2)
           
 
Method Summary
 int compareTo(SLINK.SLinkDistance o)
          Compares this object with the specified object for order.
 D getDistance()
          Returns the distance value.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

distance

D extends Distance<D> distance

id1

Integer id1

id2

Integer id2
Constructor Detail

SLINK.SLinkDistance

public SLINK.SLinkDistance(D distance,
                           Integer id1,
                           Integer id2)
Method Detail

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.

Release 0.1 (2008-07-10_1838)