Package elki.clustering.optics
Class DeLiClu.SpatialObjectPair
- java.lang.Object
-
- elki.clustering.optics.DeLiClu.SpatialObjectPair
-
- All Implemented Interfaces:
java.lang.Comparable<DeLiClu.SpatialObjectPair>
- Enclosing class:
- DeLiClu<V extends NumberVector>
public static class DeLiClu.SpatialObjectPair extends java.lang.Object implements java.lang.Comparable<DeLiClu.SpatialObjectPair>
Encapsulates an entry in the cluster order.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
distance
The current distance.(package private) DeLiCluEntry
entry1
The first entry of this pair.(package private) DeLiCluEntry
entry2
The second entry of this pair.(package private) boolean
isExpandable
Indicates whether this pair is expandable or not.
-
Constructor Summary
Constructors Constructor Description SpatialObjectPair(double distance, DeLiCluEntry entry1, DeLiCluEntry entry2, boolean isExpandable)
Creates a new entry with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DeLiClu.SpatialObjectPair other)
Compares this object with the specified object for order.boolean
equals(java.lang.Object obj)
equals is used in updating the heap!int
hashCode()
hashCode is used in updating the heap!java.lang.String
toString()
Returns a string representation of the object.
-
-
-
Field Detail
-
entry1
DeLiCluEntry entry1
The first entry of this pair.
-
entry2
DeLiCluEntry entry2
The second entry of this pair.
-
isExpandable
boolean isExpandable
Indicates whether this pair is expandable or not.
-
distance
double distance
The current distance.
-
-
Constructor Detail
-
SpatialObjectPair
public SpatialObjectPair(double distance, DeLiCluEntry entry1, DeLiCluEntry entry2, boolean isExpandable)
Creates a new entry with the specified parameters.- Parameters:
entry1
- the first entry of this pairentry2
- the second entry of this pairisExpandable
- 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 interfacejava.lang.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 java.lang.String toString()
Returns a string representation of the object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the object.
-
equals
public boolean equals(java.lang.Object obj)
equals is used in updating the heap!- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
hashCode is used in updating the heap!- Overrides:
hashCode
in classjava.lang.Object
-
-