Package elki.clustering.optics
Class OPTICSHeapEntry
- java.lang.Object
-
- elki.clustering.optics.OPTICSHeapEntry
-
- All Implemented Interfaces:
java.lang.Comparable<OPTICSHeapEntry>
public class OPTICSHeapEntry extends java.lang.Object implements java.lang.Comparable<OPTICSHeapEntry>
Entry in the priority heap.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DBIDobjectIDThe id of the entry.(package private) DBIDpredecessorIDThe id of the entry's predecessor.(package private) doublereachabilityThe reachability of the entry.
-
Constructor Summary
Constructors Constructor Description OPTICSHeapEntry(DBID objectID, DBID predecessorID, double reachability)Creates a new entry in a cluster order with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(OPTICSHeapEntry o)booleanequals(java.lang.Object o)Indicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for the object.java.lang.StringtoString()Returns a string representation of the object.
-
-
-
Constructor Detail
-
OPTICSHeapEntry
public OPTICSHeapEntry(DBID objectID, DBID predecessorID, double reachability)
Creates a new entry in a cluster order with the specified parameters.- Parameters:
objectID- the id of the entrypredecessorID- the id of the entry's predecessorreachability- the reachability of the entry
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.NOTE: for the use in an UpdatableHeap, only the ID is compared!
- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the reference object with which to compare.- Returns:
trueif this object has the same attribute values as the o argument;falseotherwise.
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the object id if this entry
-
toString
public java.lang.String toString()
Returns a string representation of the object.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of the object.
-
compareTo
public int compareTo(OPTICSHeapEntry o)
- Specified by:
compareToin interfacejava.lang.Comparable<OPTICSHeapEntry>
-
-