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) DBID
objectID
The id of the entry.(package private) DBID
predecessorID
The id of the entry's predecessor.(package private) double
reachability
The 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 int
compareTo(OPTICSHeapEntry o)
boolean
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for the object.java.lang.String
toString()
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:
equals
in classjava.lang.Object
- Parameters:
o
- the reference object with which to compare.- Returns:
true
if this object has the same attribute values as the o argument;false
otherwise.
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the object id if this entry
-
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.
-
compareTo
public int compareTo(OPTICSHeapEntry o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<OPTICSHeapEntry>
-
-