de.lmu.ifi.dbs.elki.algorithm.clustering
Class DeLiClu.SpatialObjectPair

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.clustering.DeLiClu.SpatialObjectPair
All Implemented Interfaces:
Comparable<DeLiClu.SpatialObjectPair>
Enclosing class:
DeLiClu<NV extends NumberVector<NV,?>,D extends Distance<D>>

public class DeLiClu.SpatialObjectPair
extends Object
implements Comparable<DeLiClu.SpatialObjectPair>

Encapsulates an entry in the cluster order.


Field Summary
(package private)  D distance
          The current distance.
(package private)  SpatialEntry entry1
          The first entry of this pair.
(package private)  SpatialEntry entry2
          The second entry of this pair.
(package private)  boolean isExpandable
          Indicates whether this pair is expandable or not.
 
Constructor Summary
DeLiClu.SpatialObjectPair(D distance, SpatialEntry entry1, SpatialEntry entry2, boolean isExpandable)
          Creates a new entry with the specified parameters.
 
Method Summary
 int compareTo(DeLiClu.SpatialObjectPair other)
          Compares this object with the specified object for order.
 boolean equals(Object obj)
          equals is used in updating the heap!
 int hashCode()
          hashCode is used in updating the heap!
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entry1

SpatialEntry entry1
The first entry of this pair.


entry2

SpatialEntry entry2
The second entry of this pair.


isExpandable

boolean isExpandable
Indicates whether this pair is expandable or not.


distance

D extends Distance<D> distance
The current distance.

Constructor Detail

DeLiClu.SpatialObjectPair

public DeLiClu.SpatialObjectPair(D distance,
                                 SpatialEntry entry1,
                                 SpatialEntry entry2,
                                 boolean isExpandable)
Creates a new entry with the specified parameters.

Parameters:
entry1 - the first entry of this pair
entry2 - the second entry of this pair
isExpandable - if true, this pair is expandable (a pair of nodes), otherwise this pair is not expandable (a pair of objects)
Method Detail

compareTo

public int compareTo(DeLiClu.SpatialObjectPair other)
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<DeLiClu.SpatialObjectPair>
Parameters:
other - 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.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

equals

public boolean equals(Object obj)
equals is used in updating the heap!

Overrides:
equals in class Object

hashCode

public int hashCode()
hashCode is used in updating the heap!

Overrides:
hashCode in class Object

Release 0.4.0 (2011-09-20_1324)